How can I compile a project using the boost library?

It’s because check is a macro and it’s conflicting with that boost type/function.

It depends how check is being used inside boost, but you could try the following (I don’t know if this would work on compilers other than MSVC).

#pragma push_macro("check")
#undef check
// include your boost headers
#pragma pop_macro("check")

Out of curiosity, what is your requirement for boost? (just to make sure we don’t already have an Unreal library that does what you need).

Hi all.
I’m having trouble compiling a project which includes the boost library.

I don’t have much experience with c++, but it seems that the problem may be the macro “check”, which is defined by both boost and unreal engine. The compilation error is in this line of “boost/type_traits/detail/has_binary_operator.hpp”:

   static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists

The error is this (while I figure out if I can change the vs express language to english I am going to try to translate it):

error C2226: syntax error: unexpected type 'boost::type_traits::yes_type'

Is this a boost problem, an unreal engine problem, or some build settings problem?

Thank you.

Thank you for the fast reply, it works.
I need to parse a very simple custom text file format, and I’m using boost::tokenizer. I also use boost::lexical_cast.

Boost is a pretty common C++ library set. Having support for it would be good.