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
8namespace
9n1
10 {
11 class
12 c1
13 {
14 };
15 }
16
17namespace
18n2
19 {
20 class
21 c2
22 {
23 };
24
25 std::ostream &
26 operator<<( std::ostream & s, c2 const & )
27 {
28 s << "c2";
29 return s;
30 }
31 }
32
33template <bool Test>
34struct test;
35
36template <>
37struct
38test<true>
39 {
40 };
41
42int
43main()
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

source code of boost/libs/exception/test/is_output_streamable_test.cpp