blob: 3ebc33c86b705011756f0e844379b803328fc5b0 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001// Boost.Function library
2// Copyright (C) Douglas Gregor 2008
3//
4// Use, modification and distribution is subject to the Boost
5// 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// For more information, see http://www.boost.org
Jeff Thompson3d613fd2013-10-15 15:39:04 -07009#ifndef NDNBOOST_FUNCTION_FWD_HPP
10#define NDNBOOST_FUNCTION_FWD_HPP
Jeff Thompsona28eed82013-08-22 16:21:10 -070011#include <ndnboost/config.hpp>
12
Jeff Thompson3d613fd2013-10-15 15:39:04 -070013#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(NDNBOOST_STRICT_CONFIG)
Jeff Thompsona28eed82013-08-22 16:21:10 -070014// Work around a compiler bug.
15// ndnboost::python::objects::function has to be seen by the compiler before the
16// ndnboost::function class template.
17namespace ndnboost { namespace python { namespace objects {
18 class function;
19}}}
20#endif
21
Jeff Thompson3d613fd2013-10-15 15:39:04 -070022#if defined (NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
23 || defined(NDNBOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \
24 || !(defined(NDNBOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
25# define NDNBOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
Jeff Thompsona28eed82013-08-22 16:21:10 -070026#endif
27
28namespace ndnboost {
29 class bad_function_call;
30
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031#if !defined(NDNBOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
Jeff Thompsona28eed82013-08-22 16:21:10 -070032 // Preferred syntax
33 template<typename Signature> class function;
34
35 template<typename Signature>
36 inline void swap(function<Signature>& f1, function<Signature>& f2)
37 {
38 f1.swap(f2);
39 }
40#endif // have partial specialization
41
42 // Portable syntax
43 template<typename R> class function0;
44 template<typename R, typename T1> class function1;
45 template<typename R, typename T1, typename T2> class function2;
46 template<typename R, typename T1, typename T2, typename T3> class function3;
47 template<typename R, typename T1, typename T2, typename T3, typename T4>
48 class function4;
49 template<typename R, typename T1, typename T2, typename T3, typename T4,
50 typename T5>
51 class function5;
52 template<typename R, typename T1, typename T2, typename T3, typename T4,
53 typename T5, typename T6>
54 class function6;
55 template<typename R, typename T1, typename T2, typename T3, typename T4,
56 typename T5, typename T6, typename T7>
57 class function7;
58 template<typename R, typename T1, typename T2, typename T3, typename T4,
59 typename T5, typename T6, typename T7, typename T8>
60 class function8;
61 template<typename R, typename T1, typename T2, typename T3, typename T4,
62 typename T5, typename T6, typename T7, typename T8, typename T9>
63 class function9;
64 template<typename R, typename T1, typename T2, typename T3, typename T4,
65 typename T5, typename T6, typename T7, typename T8, typename T9,
66 typename T10>
67 class function10;
68}
69
70#endif