From b6742e3e99fdbf334df93a434bf859dd4a942532 Mon Sep 17 00:00:00 2001 From: Jonathan Turkanis Date: Thu, 7 Apr 2005 03:54:07 +0000 Subject: [PATCH] added overload of unwrap for const components [SVN r28035] --- include/boost/iostreams/detail/wrap_unwrap.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/iostreams/detail/wrap_unwrap.hpp b/include/boost/iostreams/detail/wrap_unwrap.hpp index de0f1c3..87b02ac 100755 --- a/include/boost/iostreams/detail/wrap_unwrap.hpp +++ b/include/boost/iostreams/detail/wrap_unwrap.hpp @@ -11,7 +11,8 @@ # pragma once #endif -#include // SFINAE. +#include // SFINAE, MSVC. +#include #include #include // is_std_io. #include @@ -83,6 +84,11 @@ unwrap(const reference_wrapper& ref) { return ref.get(); } template typename unwrapped_type::type& unwrap(T& t) { return t; } +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) + template + const typename unwrapped_type::type& unwrap(const T& t) { return t; } +#endif + } } } // End namespaces detail, iostreams, boost. #endif // #ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED //-----------------//