1 /////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Joaquin M Lopez Munoz 2006-2008
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // See http://www.boost.org/libs/intrusive for documentation.
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP
14 #define BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP
16 #include <boost/intrusive/detail/mpl.hpp>
22 template<typename T
, bool IsEmpty
= true>
23 class ebo_functor_holder_impl
26 ebo_functor_holder_impl()
28 ebo_functor_holder_impl(const T
& t
)
31 template<class Arg1
, class Arg2
>
32 ebo_functor_holder_impl(const Arg1
& arg1
, const Arg2
& arg2
)
37 const T
& get()const{return t_
;}
44 class ebo_functor_holder_impl
<T
, false>
48 ebo_functor_holder_impl()
50 ebo_functor_holder_impl(const T
& t
)
53 template<class Arg1
, class Arg2
>
54 ebo_functor_holder_impl(const Arg1
& arg1
, const Arg2
& arg2
)
58 T
& get(){return *this;}
59 const T
& get()const{return *this;}
63 class ebo_functor_holder
64 : public ebo_functor_holder_impl
<T
, is_unary_or_binary_function
<T
>::value
>
67 typedef ebo_functor_holder_impl
<T
, is_unary_or_binary_function
<T
>::value
> super
;
70 ebo_functor_holder(){}
71 ebo_functor_holder(const T
& t
)
75 template<class Arg1
, class Arg2
>
76 ebo_functor_holder(const Arg1
& arg1
, const Arg2
& arg2
)
80 ebo_functor_holder
& operator=(const ebo_functor_holder
& x
)
88 } //namespace detail {
89 } //namespace intrusive {
92 #endif //#ifndef BOOST_INTRUSIVE_DETAIL_EBO_HOLDER_HPP