]> git.lyx.org Git - lyx.git/blob - boost/boost/format/detail/msvc_disambiguater.hpp
update to boost 1.32.0
[lyx.git] / boost / boost / format / detail / msvc_disambiguater.hpp
1 // ----------------------------------------------------------------------------
2 // msvc_disambiguater.hpp : msvc workarounds. (for put_{head|last} overloads)
3 //               the trick was described in boost's list  by Aleksey Gurtovoy
4 // ----------------------------------------------------------------------------
5
6 //  Copyright Samuel Krempp 2003. Use, modification, and distribution are
7 //  subject to the Boost Software License, Version 1.0. (See accompanying
8 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
10 // see http://www.boost.org/libs/format for library home page
11
12 // ----------------------------------------------------------------------------
13
14 #ifndef BOOST_MSVC_DISAMBIGUATER_HPP
15 #define BOOST_MSVC_DISAMBIGUATER_HPP
16
17 #if BOOST_WORKAROUND( BOOST_MSVC, <= 1300)
18    // this whole header is specifically for msvc up to 7.0
19
20 #include <boost/format/group.hpp>
21 #include <ostream>
22
23 namespace boost {
24 namespace io {
25 namespace detail {
26
27 template< class Ch, class Tr, class T >
28 struct disambiguater
29 {
30    template< typename U >
31    static void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& os, group1<U> const& x, long)
32    {
33        os << group_head(x.a1_); 
34    }
35    static void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& os, T const& x, int)
36    {
37    }
38    template< typename U >
39    static void put_last(BOOST_IO_STD basic_ostream<Ch, Tr>& os, group1<U> const& x, long)
40    {
41        os << group_last(x.a1_); 
42    }
43    static void put_last(BOOST_IO_STD basic_ostream<Ch, Tr>& os, T const& x, int)
44    {
45      os << x;
46    }
47 };
48
49 } // namespace detail
50 } // namespace io
51 } // namespace boost
52
53 #endif // -BOOST_MSVC
54
55 #endif // -BOOST_MSVC_DISAMBIGUATER_HPP