• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
13namespace boost_no_cxx11_extern_template {
14
15template<class T, class U> void f(T const* p, U const* q)
16{
17   p = q;
18}
19
20template <class T>
21class must_not_compile
22{
23public:
24   void f(T const* p, int const* q);
25};
26
27template <class T>
28void must_not_compile<T>::f(T const* p, int const* q)
29{
30   p = q;
31}
32
33extern template void f<>(int const*, float const*);
34extern template class must_not_compile<int>;
35
36int test()
37{
38  return 0;
39}
40
41}
42