• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Range library
2 //
3 //  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
4 //  distribution is subject to the Boost Software License, Version
5 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 //  http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see http://www.boost.org/libs/range/
9 //
10 
11 #ifndef BOOST_RANGE_ADAPTOR_ARGUMENT_FWD_HPP
12 #define BOOST_RANGE_ADAPTOR_ARGUMENT_FWD_HPP
13 
14 #include <boost/config.hpp>
15 
16 #ifdef BOOST_MSVC
17 #pragma warning(push)
18 #pragma warning(disable : 4512) // assignment operator could not be generated
19 #endif
20 
21 namespace boost
22 {
23     namespace range_detail
24     {
25         template< class T >
26         struct holder
27         {
28             T val;
holderboost::range_detail::holder29             holder( T t ) : val(t)
30             { }
31         };
32 
33         template< class T >
34         struct holder2
35         {
36             T val1, val2;
holder2boost::range_detail::holder237             holder2( T t, T u ) : val1(t), val2(u)
38             { }
39         };
40 
41         template< template<class> class Holder >
42         struct forwarder
43         {
44             template< class T >
operator ()boost::range_detail::forwarder45             Holder<T> operator()( T t ) const
46             {
47                 return Holder<T>(t);
48             }
49         };
50 
51         template< template<class> class Holder >
52         struct forwarder2
53         {
54             template< class T >
operator ()boost::range_detail::forwarder255             Holder<T> operator()( T t, T u ) const
56             {
57                 return Holder<T>(t,u);
58             }
59         };
60 
61         template< template<class,class> class Holder >
62         struct forwarder2TU
63         {
64             template< class T, class U >
operator ()boost::range_detail::forwarder2TU65             Holder<T, U> operator()( T t, U u ) const
66             {
67                 return Holder<T, U>(t, u);
68             }
69         };
70 
71 
72     }
73 
74 }
75 
76 #ifdef BOOST_MSVC
77 #pragma warning(pop)
78 #endif
79 
80 #endif
81