In general, it appears that cpprest/json.h and boost/iostreams_filtering.hpp are incompatible. Specifically,
on Ubuntu 14.4 with gcc 4.8.2 and boost 1.55, adding
\#include "boost/iostreams/filtering_stream.hpp"
to the sample code BlackJackClient.cpp produces the following compiler error:
In file included from /home/da24212/casablanca/Release/include/cpprest/json.h:39:0,
from /home/da24212/casablanca/Release/include/cpprest/http_msg.h:42,
from /home/da24212/casablanca/Release/include/cpprest/http_client.h:47,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/stdafx.h:63,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:24:
/usr/include/boost/iostreams/detail/access_control.hpp: In constructor ‘boost::iostreams::detail::prot_<U>::prot_(V)’:
/usr/include/boost/iostreams/detail/access_control.hpp:37:43: error: class ‘boost::iostreams::detail::prot_<U>’ does not have any field named ‘v’
template<typename V> prot_(V v) : U(v) { }
^
In file included from /usr/include/boost/iostreams/filtering_stream.hpp:16:0,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:30:
/usr/include/boost/iostreams/detail/access_control.hpp:37:50: error: expected ‘{’ at end of input
template<typename V> prot_(V v) : U(v) { }
^
In file included from /home/da24212/casablanca/Release/include/cpprest/json.h:39:0,
from /home/da24212/casablanca/Release/include/cpprest/http_msg.h:42,
from /home/da24212/casablanca/Release/include/cpprest/http_client.h:47,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/stdafx.h:63,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:24:
/usr/include/boost/iostreams/detail/access_control.hpp: In constructor ‘boost::iostreams::detail::pub_<U>::pub_(V)’:
/usr/include/boost/iostreams/detail/access_control.hpp:43:42: error: class ‘boost::iostreams::detail::pub_<U>’ does not have any field named ‘v’
template<typename V> pub_(V v) : U(v) { }
^
In file included from /usr/include/boost/iostreams/filtering_stream.hpp:16:0,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:30:
/usr/include/boost/iostreams/detail/access_control.hpp:43:49: error: expected ‘{’ at end of input
template<typename V> pub_(V v) : U(v) { }
^
make[2]: *** [BlackJack_Client/CMakeFiles/blackjackclient.dir/BlackJackClient.cpp.o] Error 1
make[1]: *** [BlackJack_Client/CMakeFiles/blackjackclient.dir/all] Error 2
make: *** [all] Error 2
on Ubuntu 14.4 with gcc 4.8.2 and boost 1.55, adding
\#include "boost/iostreams/filtering_stream.hpp"
to the sample code BlackJackClient.cpp produces the following compiler error:
In file included from /home/da24212/casablanca/Release/include/cpprest/json.h:39:0,
from /home/da24212/casablanca/Release/include/cpprest/http_msg.h:42,
from /home/da24212/casablanca/Release/include/cpprest/http_client.h:47,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/stdafx.h:63,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:24:
/usr/include/boost/iostreams/detail/access_control.hpp: In constructor ‘boost::iostreams::detail::prot_<U>::prot_(V)’:
/usr/include/boost/iostreams/detail/access_control.hpp:37:43: error: class ‘boost::iostreams::detail::prot_<U>’ does not have any field named ‘v’
template<typename V> prot_(V v) : U(v) { }
^
In file included from /usr/include/boost/iostreams/filtering_stream.hpp:16:0,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:30:
/usr/include/boost/iostreams/detail/access_control.hpp:37:50: error: expected ‘{’ at end of input
template<typename V> prot_(V v) : U(v) { }
^
In file included from /home/da24212/casablanca/Release/include/cpprest/json.h:39:0,
from /home/da24212/casablanca/Release/include/cpprest/http_msg.h:42,
from /home/da24212/casablanca/Release/include/cpprest/http_client.h:47,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/stdafx.h:63,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:24:
/usr/include/boost/iostreams/detail/access_control.hpp: In constructor ‘boost::iostreams::detail::pub_<U>::pub_(V)’:
/usr/include/boost/iostreams/detail/access_control.hpp:43:42: error: class ‘boost::iostreams::detail::pub_<U>’ does not have any field named ‘v’
template<typename V> pub_(V v) : U(v) { }
^
In file included from /usr/include/boost/iostreams/filtering_stream.hpp:16:0,
from /home/da24212/casaTest/BlackJack/BlackJack_Client/BlackJackClient.cpp:30:
/usr/include/boost/iostreams/detail/access_control.hpp:43:49: error: expected ‘{’ at end of input
template<typename V> pub_(V v) : U(v) { }
^
make[2]: *** [BlackJack_Client/CMakeFiles/blackjackclient.dir/BlackJackClient.cpp.o] Error 1
make[1]: *** [BlackJack_Client/CMakeFiles/blackjackclient.dir/all] Error 2
make: *** [all] Error 2