forked from boostorg/fusion
tweaked cref_result and ref_result to be non-lazy (for consistency).
[SVN r78058]
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
||||
#include <boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp>
|
||||
#include <boost/fusion/container/deque/deque_fwd.hpp>
|
||||
@ -56,8 +57,8 @@ namespace boost { namespace fusion
|
||||
: base(seq)
|
||||
{}
|
||||
|
||||
explicit deque(typename add_reference<typename add_const<Head>::type>::type head
|
||||
, typename add_reference<typename add_const<Tail>::type>::type... tail)
|
||||
explicit deque(typename detail::call_param<Head>::type head
|
||||
, typename detail::call_param<Tail>::type... tail)
|
||||
: base(detail::deque_keyed_values<Head, Tail...>::call(head, tail...))
|
||||
{}
|
||||
|
||||
|
@ -8,9 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330)
|
||||
#define BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330
|
||||
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
|
||||
@ -39,10 +37,6 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
typedef Rest base;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef typename
|
||||
add_reference<typename add_const<Value>::type>::type
|
||||
const_value_type;
|
||||
typedef typename add_reference<Value>::type value_type;
|
||||
using Rest::get;
|
||||
|
||||
template <typename It>
|
||||
@ -63,17 +57,17 @@ namespace boost { namespace fusion { namespace detail
|
||||
return *this;
|
||||
}
|
||||
|
||||
const_value_type get(Key) const
|
||||
typename cref_result<Value>::type get(Key) const
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
value_type get(Key)
|
||||
typename ref_result<Value>::type get(Key)
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
keyed_element(const_value_type value, Rest const& rest)
|
||||
keyed_element(typename call_param<Value>::type value, Rest const& rest)
|
||||
: Rest(rest), value_(value)
|
||||
{}
|
||||
|
||||
|
Reference in New Issue
Block a user