]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/config/test/boost_no_extern_template.ipp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_extern_template.ipp
1 // (C) Copyright Beman Dawes 2008
2
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 // See http://www.boost.org/libs/config for more information.
8
9 // MACRO: BOOST_NO_CXX11_EXTERN_TEMPLATE
10 // TITLE: C++0x extern template unavailable
11 // DESCRIPTION: The compiler does not support C++0x extern template
12
13 namespace boost_no_cxx11_extern_template {
14
15 template<class T, class U> void f(T const* p, U const* q)
16 {
17 p = q;
18 }
19
20 template <class T>
21 class must_not_compile
22 {
23 public:
24 void f(T const* p, int const* q);
25 };
26
27 template <class T>
28 void must_not_compile<T>::f(T const* p, int const* q)
29 {
30 p = q;
31 }
32
33 extern template void f<>(int const*, float const*);
34 extern template class must_not_compile<int>;
35
36 int test()
37 {
38 return 0;
39 }
40
41 }