Summit
Summit

Reputation: 2268

Adding boost header files gives compile time errors

When i add the header file

  #include <boost/fusion/adapted/struct/adapt_struct.hpp>

It gives couple of errors

error C2988: unrecognizable template declaration/definition
error C2143: syntax error: missing ';' before '<'
error C2913: explicit specialization; 'boost::type_of::id2type_impl' is not a specialization of a class template
error C2059: syntax error: '<'
error C2334: unexpected token(s) preceding '{'; skipping apparent function body

which point towards the line number 125 in typeof_impl.hpp file.

Upvotes: 0

Views: 738

Answers (2)

Summit
Summit

Reputation: 2268

After reading drescherjm , sehe's comments i changed some settings in the visual studio and when i changed platform Toolset from visual studio 2017 v(141) to visual studio 2015 v(140) , the program compiled sucessfully.

Upvotes: 0

sehe
sehe

Reputation: 393593

It's unclear what file you mean:

custom/boost_1_72_0/boost/typeof/typeof_impl.hpp
custom/boost_1_72_0/boost/typeof/msvc/typeof_impl.hpp
custom/boost_1_72_0/boost/typeof/dmc/typeof_impl.hpp

If you mean msvc/typeof_impl.hpp then most likely you have a preprocessor issue (where the source is mutated due to a redefined preprocessor token).

If there's no such file than @drescherjm's comment may be on point: there might be specific MSVC support missing in that version you're using.

Upvotes: 1

Related Questions