1//  (C) Copyright John Maddock 2001.
2//  (C) Copyright Aleksey Gurtovoy 2003.
3//  (C) Copyright Alisdair Meredith 2006.
4//  Use, modification and distribution are subject to the
5//  Boost Software License, Version 1.0. (See accompanying file
6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8//  See http://www.boost.org/libs/config for most recent version.
9
10//  MACRO:         BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
11//  TITLE:         template specialisations of function types
12//  DESCRIPTION:   If the compiler cannot handle template specialisations
13//                 for function types
14
15
16namespace boost_no_function_type_specializations{
17
18template< typename T > struct is_function
19{
20};
21
22struct X {};
23enum   Y { value };
24
25//  Tesst can declare specializations
26typedef is_function< int( int ) >   scalar_types;
27typedef is_function< X( X ) >       user_defined_type;
28typedef is_function< int( Y ) >     check_enum;
29typedef is_function< X( X, int ) >  multiple_arguments;
30
31//  Partial specialization test
32//  confirm const, volatile, pointers and references in args
33template< typename X, typename Y, typename Z >
34struct is_function< X( Y const &, volatile Z * ) >
35{
36};
37
38
39int test()
40{
41   return 0;
42}
43
44}
45