]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | // Copyright (C) 2009-2012 Lorenzo Caminiti | |
3 | // Distributed under the Boost Software License, Version 1.0 | |
4 | // (see accompanying file LICENSE_1_0.txt or a copy at | |
5 | // http://www.boost.org/LICENSE_1_0.txt) | |
6 | // Home at http://www.boost.org/libs/functional/overloaded_function | |
7 | ||
8 | #ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_HPP_ | |
9 | #define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_HPP_ | |
10 | ||
11 | /** @file | |
12 | @brief Change the compile-time configuration of this library. | |
13 | */ | |
14 | ||
15 | /** | |
16 | @brief Specify the maximum number of arguments of the functions being | |
17 | overloaded. | |
18 | ||
19 | If this macro is left undefined by the user, it has a default value of 5 | |
20 | (increasing this number might increase compilation time). | |
21 | When specified by the user, this macro must be a non-negative integer number. | |
22 | ||
23 | @See @RefSect{getting_started, Getting Started}, | |
24 | @RefClass{boost::overloaded_function}. | |
25 | */ | |
26 | #ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX | |
27 | # define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX 5 | |
28 | #endif | |
29 | ||
30 | /** | |
31 | @brief Specify the maximum number of functions that can be overloaded. | |
32 | ||
33 | If this macro is left undefined by the user, it has a default value of 5 | |
34 | (increasing this number might increase compilation time). | |
35 | When defined by the user, this macro must be an integer number greater or | |
36 | equal than 2 (because at least two distinct functions need to be specified in | |
37 | order to define an overload). | |
38 | ||
39 | @See @RefSect{getting_started, Getting Started}, | |
40 | @RefClass{boost::overloaded_function}. | |
41 | */ | |
42 | #ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX | |
43 | # define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX 5 | |
44 | #endif | |
45 | #if BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX < 2 | |
46 | # error "maximum overload macro cannot be less than 2" | |
47 | #endif | |
48 | ||
49 | #endif // #include guard | |
50 |