Oleg Shirokikh
Oleg Shirokikh

Reputation: 3575

Issue with Boost 1.64 and Visual Studio 2017

I'm upgrading the libraries to MSVC 141 and moving to Visual Studio 2017.

I've downloaded the newest Boost libraries (boost_1_64_0_b2-msvc-14.1-64.exe). When building the code, I get this error:

...\boost\move\detail\type_traits.hpp(757): error C2187: syntax error: ')' was unexpected here ...\boost\move\detail\type_traits.hpp(763): note: see reference to class template instantiation 'boost::move_detail::is_copy_constructible' being compiled

In the mentioned header, BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE is defined but the latest MSVC doesn't understand the enclosed code.

Undefining this macro helps, but it there a better solution to fix this? What's the reason here?

Upvotes: 3

Views: 2021

Answers (2)

Siarhei Rabukha
Siarhei Rabukha

Reputation: 21

need include -

#define _TURN_OFF_PLATFORM_STRING

"#include <cpprest/details/basic_types.h>"

....

see: https://github.com/Microsoft/vcpkg/issues/836

Upvotes: 2

Serge Rogatch
Serge Rogatch

Reputation: 15100

As suggested here, undefine macro U after each inclusion of cpprest headers or before inclusion of boost headers.

Example:

#include <cpprest/http_client.h>
#undef U

Upvotes: 5

Related Questions