diff options
-rw-r--r-- | libadhocutil/curlStream.h | 2 | ||||
-rw-r--r-- | libadhocutil/unittests/testCurl.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libadhocutil/curlStream.h b/libadhocutil/curlStream.h index 74816a0..2528bd8 100644 --- a/libadhocutil/curlStream.h +++ b/libadhocutil/curlStream.h @@ -26,7 +26,7 @@ class DLL_PUBLIC CurlStreamSource : public boost::iostreams::source, public Curl CURLcode res; }; -typedef boost::reference_wrapper<CurlStreamSource> css_ref; +typedef boost::iostreams::stream<boost::reference_wrapper<CurlStreamSource>> CurlStream; #endif diff --git a/libadhocutil/unittests/testCurl.cpp b/libadhocutil/unittests/testCurl.cpp index a62800d..7d447c8 100644 --- a/libadhocutil/unittests/testCurl.cpp +++ b/libadhocutil/unittests/testCurl.cpp @@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE( fetch_file_stream ) { auto url = "file://" + rootDir.string() + "/testCurl.cpp"; CurlStreamSource css(url); - boost::iostreams::stream<css_ref> curlstrm(boost::ref(css)); + CurlStream curlstrm(css); std::string tok; curlstrm >> tok; BOOST_REQUIRE_EQUAL("#define", tok); @@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE( fetch_missing_stream ) auto url = "file://" + rootDir.string() + "/nothere"; BOOST_REQUIRE_THROW({ CurlStreamSource css(url); - boost::iostreams::stream<css_ref> curlstrm(boost::ref(css)); + CurlStream curlstrm(css); std::string tok; curlstrm >> tok; }, AdHoc::Net::CurlException); |