diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:30:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:32:57 +0900 |
commit | 71d216b90256936a9638f325af9bc69d720e75de (patch) | |
tree | 9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /boost/fusion/sequence/intrinsic/value_at.hpp | |
parent | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff) | |
download | boost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2 boost-71d216b90256936a9638f325af9bc69d720e75de.zip |
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/fusion/sequence/intrinsic/value_at.hpp')
-rw-r--r-- | boost/fusion/sequence/intrinsic/value_at.hpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/boost/fusion/sequence/intrinsic/value_at.hpp b/boost/fusion/sequence/intrinsic/value_at.hpp index 362669b521..152f0c9455 100644 --- a/boost/fusion/sequence/intrinsic/value_at.hpp +++ b/boost/fusion/sequence/intrinsic/value_at.hpp @@ -9,8 +9,13 @@ #include <boost/fusion/support/config.hpp> #include <boost/mpl/int.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/empty_base.hpp> #include <boost/fusion/sequence/intrinsic_fwd.hpp> #include <boost/fusion/support/tag_of.hpp> +#include <boost/fusion/support/category_of.hpp> namespace boost { namespace fusion { @@ -50,12 +55,26 @@ namespace boost { namespace fusion struct value_at_impl<std_pair_tag>; } + namespace detail + { + template <typename Sequence, typename N, typename Tag> + struct value_at_impl + : mpl::if_< + mpl::or_< + mpl::less<N, typename extension::size_impl<Tag>::template apply<Sequence>::type> + , traits::is_unbounded<Sequence> + > + , typename extension::value_at_impl<Tag>::template apply<Sequence, N> + , mpl::empty_base + >::type + {}; + } + namespace result_of { template <typename Sequence, typename N> struct value_at - : extension::value_at_impl<typename detail::tag_of<Sequence>::type>:: - template apply<Sequence, N> + : detail::value_at_impl<Sequence, N, typename detail::tag_of<Sequence>::type> {}; template <typename Sequence, int N> |