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.06k stars 77 forks source link

example-serialize has 3 error #18

Closed runner0353 closed 4 years ago

runner0353 commented 4 years ago

clang++ example-serialization.cpp -o example-serialization -std=c++17 -I ./../ In file included from example-serialization.cpp:10: ./../refl.hpp:1715:72: error: too few template arguments for class template 'debug' struct is_instance_of<T, U> : public std::is_same<T, U> ^ ./../refl.hpp:1725:33: note: in instantiation of template class 'refl::trait::detail::is_instance_of<debug, refl::attr::base_types<> >' requested here struct is_instance_of : detail::is_instance_of<T, U> ^ ./../refl.hpp:1734:66: note: in instantiation of template class 'refl::trait::is_instance_of<debug, refl::attr::base_types<> >' requested here [[maybe_unused]] static constexpr bool is_instance_of_v{ is_instance_of<T, U>::value }; ^ ./../refl.hpp:1899:42: note: in instantiation of variable template specializatio How to solve the problem of serial compilation?I use g ++ to compile the same

veselink1 commented 4 years ago

Hello,

This seemed to be caused by an incorrect implementation of is_instance_of. Are you able to successfully run the example with the referenced commit?

runner0353 commented 4 years ago

In addition to the serialization example, other examples can be passed