forked from boostorg/fusion
tweaked cref_result and ref_result to be non-lazy (for consistency).
[SVN r78058]
This commit is contained in:
@ -27,7 +27,7 @@ namespace boost { namespace fusion
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename mpl::at<typename Sequence::types, N>::type element;
|
||||
typedef typename detail::ref_result<element>::type type;
|
||||
|
||||
static type
|
||||
@ -40,7 +40,7 @@ namespace boost { namespace fusion
|
||||
template <typename Sequence, typename N>
|
||||
struct apply <Sequence const, N>
|
||||
{
|
||||
typedef mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename mpl::at<typename Sequence::types, N>::type element;
|
||||
typedef typename detail::cref_result<element>::type type;
|
||||
|
||||
static type
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -29,14 +30,14 @@ namespace boost { namespace fusion
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename mpl::at<
|
||||
typename vector::types, index>
|
||||
typename vector::types, index>::type
|
||||
element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::if_<
|
||||
is_const<vector>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
, typename fusion::detail::cref_result<element>::type
|
||||
, typename fusion::detail::ref_result<element>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
|
Reference in New Issue
Block a user