]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/config/test/boost_no_using_template.ipp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_using_template.ipp
1 // (C) Copyright John Maddock 2001.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 // See http://www.boost.org/libs/config for most recent version.
7
8 // MACRO: BOOST_NO_USING_TEMPLATE
9 // TITLE: using template declarations
10 // DESCRIPTION: The compiler will not accept a using declaration
11 // that imports a class or function template
12 // into a named namespace. Probably Borland/MSVC6 specific.
13
14 template <class T>
15 int global_foo(T)
16 {
17 return 0;
18 }
19
20 template <class T, class U = void>
21 struct op
22 {
23 friend op<T,U> operator +(const op&, const op&)
24 {
25 return op();
26 };
27 };
28
29 namespace boost_no_using_template{
30
31 using ::global_foo;
32 using ::op;
33
34 int test()
35 {
36 boost_no_using_template::op<int, int> a;
37 boost_no_using_template::op<int, int> b;
38 a+b;
39 return boost_no_using_template::global_foo(0);
40 }
41
42 }
43
44
45
46
47