bloomberg / clang-p2996

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

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

Closed HungMingWu closed 2 months ago

HungMingWu commented 2 months ago

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

katzdm commented 2 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 2 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.