boostorg / core

Boost Core Utilities
132 stars 86 forks source link

Error when I compile: expected identifier before ‘;’ token #174

Closed zh-pan closed 3 weeks ago

zh-pan commented 3 weeks ago

image

/usr/include/boost/core/noinit_adaptor.hpp: In member function ‘void boost::noinit_adaptor::destroy(U*)’: /usr/include/boost/core/noinit_adaptor.hpp:58:16: error: expected identifier before ‘;’ token

My relate issue.

And I find somebody had same error: the link.

The issue #81 has relate?

Somebody can help me? Thanks!

pdimov commented 3 weeks ago

As explained in the Reddit comments and in issue #81, the error is caused by cpprestsdk defining a macro U(x).

You can avoid it by defining _TURN_OFF_PLATFORM_STRING before including the cpprestsdk headers.

zh-pan commented 3 weeks ago

As explained in the Reddit comments and in issue #81, the error is caused by cpprestsdk defining a macro U(x).

You can avoid it by defining _TURN_OFF_PLATFORM_STRING before including the cpprestsdk headers.

It work!

Thanks again!