Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:53

0001 // ----------------------------------------------------------------------------
0002 // msvc_disambiguater.hpp : msvc workarounds. (for put_{head|last} overloads)
0003 //               the trick was described in boost's list  by Aleksey Gurtovoy
0004 // ----------------------------------------------------------------------------
0005 
0006 //  Copyright Samuel Krempp 2003. Use, modification, and distribution are
0007 //  subject to the Boost Software License, Version 1.0. (See accompanying
0008 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 // see http://www.boost.org/libs/format for library home page
0011 
0012 // ----------------------------------------------------------------------------
0013 
0014 #ifndef BOOST_MSVC_DISAMBIGUATER_HPP
0015 #define BOOST_MSVC_DISAMBIGUATER_HPP
0016 
0017 #if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
0018 
0019 #include <boost/format/group.hpp>
0020 #include <ostream>
0021 
0022 namespace boost {
0023 namespace io {
0024 namespace detail {
0025 
0026 template< class Ch, class Tr, class T >
0027 struct disambiguater
0028 {
0029    template< typename U >
0030    static void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& os, group1<U> const& x, long)
0031    {
0032        os << group_head(x.a1_); 
0033    }
0034    static void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& os, T const& x, int)
0035    {
0036    }
0037    template< typename U >
0038    static void put_last(BOOST_IO_STD basic_ostream<Ch, Tr>& os, group1<U> const& x, long)
0039    {
0040        os << group_last(x.a1_); 
0041    }
0042    static void put_last(BOOST_IO_STD basic_ostream<Ch, Tr>& os, T const& x, int)
0043    {
0044      os << x;
0045    }
0046 };
0047 
0048 } // namespace detail
0049 } // namespace io
0050 } // namespace boost
0051 
0052 #endif // -__DECCXX_VER
0053 
0054 #endif // -BOOST_MSVC_DISAMBIGUATER_HPP