summaryrefslogtreecommitdiff
path: root/boost/fusion/container/deque/deque_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/container/deque/deque_iterator.hpp')
-rw-r--r--boost/fusion/container/deque/deque_iterator.hpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/boost/fusion/container/deque/deque_iterator.hpp b/boost/fusion/container/deque/deque_iterator.hpp
index c61d6f9..c220379 100644
--- a/boost/fusion/container/deque/deque_iterator.hpp
+++ b/boost/fusion/container/deque/deque_iterator.hpp
@@ -11,9 +11,14 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/iterator_facade.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+#include <boost/mpl/int.hpp>
#include <boost/mpl/minus.hpp>
#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
namespace boost { namespace fusion {
@@ -26,7 +31,7 @@ namespace boost { namespace fusion {
typedef Seq sequence;
typedef mpl::int_<Pos> index;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
deque_iterator(Seq& seq)
: seq_(seq)
{}
@@ -49,7 +54,7 @@ namespace boost { namespace fusion {
add_const<element_type>,
mpl::identity<element_type> >::type>::type type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Iterator const& it)
{
@@ -64,7 +69,7 @@ namespace boost { namespace fusion {
typedef typename Iterator::sequence sequence;
typedef deque_iterator<sequence, index::value + N::value> type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Iterator const& i)
{
@@ -91,7 +96,7 @@ namespace boost { namespace fusion {
>::type
type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(I1 const&, I2 const&)
{
@@ -113,4 +118,13 @@ namespace boost { namespace fusion {
}}
+#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
+namespace std
+{
+ template <typename Seq, int Pos>
+ struct iterator_traits< ::boost::fusion::deque_iterator<Seq, Pos> >
+ { };
+}
+#endif
+
#endif