You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this minimal example, Clang outputs the following:
main.cpp:12:3: error: functions that differ only in their return type cannot be overloaded
VISITABLE(int, c);
^~~~~~~~~~~~~~~~~
visit_struct/include/visit_struct/visit_struct_intrusive.hpp:382:3: note: expanded from macro 'VISITABLE'
Visit_Struct_Get_Visitables__(::visit_struct::detail::Rank<VISIT_STRUCT_GET_REGISTERED_MEMBERS::size + 1>);
^
main.cpp:11:3: note: previous declaration is here
VISITABLE(int, b);
^~~~~~~~~~~~~~~~~
visit_struct/include/visit_struct/visit_struct_intrusive.hpp:382:3: note: expanded from macro 'VISITABLE'
Visit_Struct_Get_Visitables__(::visit_struct::detail::Rank<VISIT_STRUCT_GET_REGISTERED_MEMBERS::size + 1>);
^
1 error generated.
Both GCC and MSVC compile this example just fine, only Clang has problems with it. The problem happens only with visitable structs inside template classes. Without the template, it works just fine. Curiously, it also works fine with exactly 2 visitables in the struct - it starts failing for 3.
The text was updated successfully, but these errors were encountered:
I ran into problems getting the following to work in Clang 12.0.0, using the latest master of visit_struct:
For this minimal example, Clang outputs the following:
Both GCC and MSVC compile this example just fine, only Clang has problems with it. The problem happens only with visitable structs inside template classes. Without the template, it works just fine. Curiously, it also works fine with exactly 2 visitables in the struct - it starts failing for 3.
The text was updated successfully, but these errors were encountered: