New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change base of tuple #151

Merged
merged 5 commits into from Oct 12, 2017
Jump to file or symbol
Failed to load files and symbols.
+9 −9
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

Improve vector value_at performance.

  • Loading branch information...
Flast committed Oct 7, 2017
commit e606ceeff060b6cfe6a7e8adeb4eda78d33b708a
@@ -23,16 +23,19 @@
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/vector/vector_fwd.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/remove_cv.hpp>
namespace boost { namespace fusion
{
struct vector_tag;
namespace vector_detail
{
template <typename I, typename ...T>
struct vector_data;
template <std::size_t I, typename T>
struct store;
template <std::size_t N, typename U>
static inline BOOST_FUSION_GPU_ENABLED
U value_at_impl(store<N, U> const volatile*);
}
namespace extension
@@ -46,8 +49,9 @@ namespace boost { namespace fusion
template <typename Sequence, typename N>
struct apply
{
typedef typename boost::remove_cv<Sequence>::type seq;
typedef typename mpl::identity<decltype(seq::template value_at_impl<N::value>(boost::declval<seq*>()))>::type::type type;
typedef
decltype(vector_detail::value_at_impl<N::value>(boost::declval<Sequence*>()))
type;
};
};
}
@@ -258,10 +258,6 @@ namespace boost { namespace fusion
{
return at_detail<J::value>(this);
}
template <std::size_t N, typename U>
static BOOST_FUSION_GPU_ENABLED
mpl::identity<U> value_at_impl(store<N, U>*);
};
} // namespace boost::fusion::vector_detail
ProTip! Use n and p to navigate between commits in a pull request.