added overload of unwrap for const components

[SVN r28035]
This commit is contained in:
Jonathan Turkanis
2005-04-07 03:54:07 +00:00
parent f3fed06178
commit b6742e3e99

View File

@@ -11,7 +11,8 @@
# pragma once
#endif
#include <boost/config.hpp> // SFINAE.
#include <boost/config.hpp> // SFINAE, MSVC.
#include <boost/detail/workaround.hpp>
#include <boost/iostreams/detail/enable_if_stream.hpp>
#include <boost/iostreams/traits_fwd.hpp> // is_std_io.
#include <boost/mpl/bool.hpp>
@@ -83,6 +84,11 @@ unwrap(const reference_wrapper<T>& ref) { return ref.get(); }
template<typename T>
typename unwrapped_type<T>::type& unwrap(T& t) { return t; }
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
template<typename T>
const typename unwrapped_type<T>::type& unwrap(const T& t) { return t; }
#endif
} } } // End namespaces detail, iostreams, boost.
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED //-----------------//