Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/functional/factory.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
13 # include <boost/preprocessor/repetition/enum_params.hpp> | 13 # include <boost/preprocessor/repetition/enum_params.hpp> |
14 # include <boost/preprocessor/repetition/enum_binary_params.hpp> | 14 # include <boost/preprocessor/repetition/enum_binary_params.hpp> |
15 | 15 |
16 # include <new> | 16 # include <new> |
17 # include <boost/pointee.hpp> | 17 # include <boost/pointee.hpp> |
18 # include <boost/none_t.hpp> | |
19 # include <boost/get_pointer.hpp> | 18 # include <boost/get_pointer.hpp> |
20 # include <boost/non_type.hpp> | 19 # include <boost/non_type.hpp> |
21 # include <boost/type_traits/remove_cv.hpp> | 20 # include <boost/type_traits/remove_cv.hpp> |
21 | |
22 # if defined(BOOST_FUNCTIONAL_FACTORY_SUPPORT_NONE_T) | |
23 # include <boost/none_t.hpp> | |
24 # endif | |
22 | 25 |
23 # ifndef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY | 26 # ifndef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY |
24 # define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 10 | 27 # define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 10 |
25 # elif BOOST_FUNCTIONAL_FACTORY_MAX_ARITY < 3 | 28 # elif BOOST_FUNCTIONAL_FACTORY_MAX_ARITY < 3 |
26 # undef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY | 29 # undef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY |
33 { | 36 { |
34 factory_alloc_for_pointee_and_deleter, | 37 factory_alloc_for_pointee_and_deleter, |
35 factory_passes_alloc_to_smart_pointer | 38 factory_passes_alloc_to_smart_pointer |
36 }; | 39 }; |
37 | 40 |
41 #if defined(BOOST_FUNCTIONAL_FACTORY_SUPPORT_NONE_T) | |
38 template< typename Pointer, class Allocator = boost::none_t, | 42 template< typename Pointer, class Allocator = boost::none_t, |
39 factory_alloc_propagation AP = factory_alloc_for_pointee_and_deleter > | 43 factory_alloc_propagation AP = factory_alloc_for_pointee_and_deleter > |
40 class factory; | 44 class factory; |
45 #else | |
46 template< typename Pointer, class Allocator = void, | |
47 factory_alloc_propagation AP = factory_alloc_for_pointee_and_deleter > | |
48 class factory; | |
49 #endif | |
41 | 50 |
42 //----- ---- --- -- - - - - | 51 //----- ---- --- -- - - - - |
43 | 52 |
44 template< typename Pointer, factory_alloc_propagation AP > | 53 template< typename Pointer, factory_alloc_propagation AP > |
45 class factory<Pointer, boost::none_t, AP> | 54 class factory<Pointer, void, AP> |
46 { | 55 { |
47 public: | 56 public: |
48 typedef typename boost::remove_cv<Pointer>::type result_type; | 57 typedef typename boost::remove_cv<Pointer>::type result_type; |
49 typedef typename boost::pointee<result_type>::type value_type; | 58 typedef typename boost::pointee<result_type>::type value_type; |
50 | 59 |
53 | 62 |
54 # define BOOST_PP_FILENAME_1 <boost/functional/factory.hpp> | 63 # define BOOST_PP_FILENAME_1 <boost/functional/factory.hpp> |
55 # define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY) | 64 # define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY) |
56 # include BOOST_PP_ITERATE() | 65 # include BOOST_PP_ITERATE() |
57 }; | 66 }; |
67 | |
68 #if defined(BOOST_FUNCTIONAL_FACTORY_SUPPORT_NONE_T) | |
69 template< typename Pointer, factory_alloc_propagation AP > | |
70 class factory<Pointer, boost::none_t, AP> | |
71 : public factory<Pointer, void, AP> | |
72 {}; | |
73 #endif | |
58 | 74 |
59 template< class Pointer, class Allocator, factory_alloc_propagation AP > | 75 template< class Pointer, class Allocator, factory_alloc_propagation AP > |
60 class factory | 76 class factory |
61 : private Allocator::template rebind< typename boost::pointee< | 77 : private Allocator::template rebind< typename boost::pointee< |
62 typename boost::remove_cv<Pointer>::type >::type >::other | 78 typename boost::remove_cv<Pointer>::type >::type >::other |