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
The "boost::enable_if" struct is used in file "camp/detail/rawtype.hpp" but there is no proper Boost include. This causes an error while compiling my project with GCC 9.3 (and Boost 1.71) which includes "camp/detail/typeid.hpp"
then "camp/detail/objecttraits.hpp" then "camp/detail/rawtype.hpp".
I wonder why this has not been detected before. Maybe there is some change in the way GCC process templates...
Formerly I was using gcc4.9 and gcc7 with Boost 1.69 and it was ok.
Having a look on some Camp headers, the "#include <boost/utility/enable_if.hpp>" header is often (if not always) included after dependee Camp headers so that, depending on the way we use/include Camp stuff, this issue is not detected if the client code has its own enable_if include somewhere.
I will suggest to include first dependee Boost headers before Camp ones as a general rule... unless someone has a strong argument against this approach.
The text was updated successfully, but these errors were encountered:
If I change the includes' ordering in "camp/detal/typeid.hpp", it compiles again.
Details on my compiler error log:
In file included from /usr/include/camp/detail/objecttraits.hpp:37,
from /usr/include/camp/detail/typeid.hpp:37,
from my own foo.h
...
/usr/include/camp/detail/rawtype.hpp:100:38: error: ‘enable_if’ in namespace ‘boost’ does not name a template type
100 | struct RawType, typename boost::enable_if, U> >::type>
| ^~~~~~~~~
/usr/include/camp/detail/rawtype.hpp:100:47: error: expected template-argument before ‘<’ token
100 | struct RawType, typename boost::enable_if, U> >::type>
| ^
/usr/include/camp/detail/rawtype.hpp:100:47: error: expected ‘>’ before ‘<’ token
/usr/include/camp/detail/rawtype.hpp:100:79: error: template argument 2 is invalid
100 | struct RawType, typename boost::enable_if, U> >::type>
| ^
The "boost::enable_if" struct is used in file "camp/detail/rawtype.hpp" but there is no proper Boost include. This causes an error while compiling my project with GCC 9.3 (and Boost 1.71) which includes "camp/detail/typeid.hpp"
then "camp/detail/objecttraits.hpp" then "camp/detail/rawtype.hpp".
I wonder why this has not been detected before. Maybe there is some change in the way GCC process templates...
Formerly I was using gcc4.9 and gcc7 with Boost 1.69 and it was ok.
Having a look on some Camp headers, the "#include <boost/utility/enable_if.hpp>" header is often (if not always) included after dependee Camp headers so that, depending on the way we use/include Camp stuff, this issue is not detected if the client code has its own enable_if include somewhere.
I will suggest to include first dependee Boost headers before Camp ones as a general rule... unless someone has a strong argument against this approach.
The text was updated successfully, but these errors were encountered: