• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
2 
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/exception/detail/is_output_streamable.hpp>
7 
8 namespace
9 n1
10     {
11     class
12     c1
13         {
14         };
15     }
16 
17 namespace
18 n2
19     {
20     class
21     c2
22         {
23         };
24 
25     std::ostream &
operator <<(std::ostream & s,c2 const &)26     operator<<( std::ostream & s, c2 const & )
27         {
28         s << "c2";
29         return s;
30         }
31     }
32 
33 template <bool Test>
34 struct test;
35 
36 template <>
37 struct
38 test<true>
39     {
40     };
41 
42 int
main()43 main()
44     {
45     test<!boost::is_output_streamable<n1::c1>::value>();
46     test<boost::is_output_streamable<n2::c2>::value>();
47     test<boost::is_output_streamable<int>::value>();
48     return 0;
49     }
50