bloomberg / clang-p2996

Experimental clang support for WG21 P2996 (Reflection).
https://github.com/bloomberg/clang-p2996/tree/p2996/P2996.md
60 stars 12 forks source link

Fix compile issue: error: no matching function for call #65

Closed HungMingWu closed 4 months ago

HungMingWu commented 4 months ago

Fix compile issue: error: no matching function for call cannot convert initializer list argument to 'std::span

katzdm commented 4 months ago

Hey @HungMingWu , thanks for the PR! I'm not able to reproduce the issue that you're seeing; can you provide an example code snippet?

Here is an example of type_is_assignable working as currently implemented: https://godbolt.org/z/5a4hEd3qj

HungMingWu commented 4 months ago

Hey @HungMingWu , thanks for the PR! I'm not able to reproduce the issue that you're seeing; can you provide an example code snippet?

Here is an example of type_is_assignable working as currently implemented: https://godbolt.org/z/5a4hEd3qj

All right, I found the problem. Your compile flag is

-fparameter-reflection

Mine is

-fparameter-reflection -std=c++23

Append C++23 will cause the issue, please close the MR.