veselink1 / refl-cpp

Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
https://veselink1.github.io/refl-cpp/md__introduction.html
MIT License
1.05k stars 76 forks source link

Issues compiling under Clang11 #42

Closed ALaRoccoAtAMD closed 3 years ago

ALaRoccoAtAMD commented 3 years ago

Hi Veselin, I'm seeing issues compiling under Clang11. I will try another compiler, but wondering if I did something wrong, or if you haven't tried Clang11 yet.

Thanks very much, Andy

Here are some of them:

refl.hpp:149:48: error: constructor parameter 'data' shadows the field 'data' of 'const_string' [-Werror,-Wshadow-field-in-constructor] constexpr const_string(const char(&data)[N + 1]) noexcept ^ agmlog_csv_generator/../../include/gpu/refl.hpp:128:18: note: previous declaration is here char data[N + 1]; ^ agmlog_csv_generator/../../include/gpu/refl.hpp:259:48: error: constructor parameter 'data' shadows the field 'data' of 'const_string' [-Werror,-Wshadow-field-in-constructor] constexpr const_string(const char(&data)[sizeof...(Idx) + 1], std::index_sequence) noexcept ^ agmlog_csv_generator/../../include/gpu/refl.hpp:128:18: note: previous declaration is here char data[N + 1]; ^ agmlog_csv_generator/../../include/gpu/refl.hpp:1938:44: error: constructor parameter 'friendly_name' shadows the field 'friendly_name' of 'property' [-Werror,-Wshadow-field-in-constructor] constexpr property(const char* friendly_name) noexcept

ALaRoccoAtAMD commented 3 years ago

After trying a few more compilers, this appears to be related to the compiler options I've inherited from our project. I'll look into it on my side.