mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-21 00:02:42 +02:00
Added adapter for std::tuple (only for implementations using variadic templates)
[SVN r74547]
This commit is contained in:
@ -135,6 +135,7 @@ import testing ;
|
|||||||
[ run sequence/define_assoc_struct.cpp : : : : ]
|
[ run sequence/define_assoc_struct.cpp : : : : ]
|
||||||
[ run sequence/define_tpl_struct.cpp : : : : ]
|
[ run sequence/define_tpl_struct.cpp : : : : ]
|
||||||
[ run sequence/define_assoc_tpl_struct.cpp : : : : ]
|
[ run sequence/define_assoc_tpl_struct.cpp : : : : ]
|
||||||
|
[ run sequence/std_tuple_iterator.cpp : : : : ]
|
||||||
|
|
||||||
[ run functional/fused.cpp : : : : ]
|
[ run functional/fused.cpp : : : : ]
|
||||||
[ run functional/fused_function_object.cpp : : : : ]
|
[ run functional/fused_function_object.cpp : : : : ]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
Copyright (c) 2001-2011 Joel de Guzman
|
Copyright (c) 2001-2011 Joel de Guzman
|
||||||
|
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -113,7 +113,7 @@ void test()
|
|||||||
BOOST_TEST(*next(next(next(i))) == s);
|
BOOST_TEST(*next(next(next(i))) == s);
|
||||||
|
|
||||||
next(next(next(next(i)))); // end
|
next(next(next(next(i)))); // end
|
||||||
|
|
||||||
#ifdef FUSION_TEST_FAIL
|
#ifdef FUSION_TEST_FAIL
|
||||||
next(next(next(next(next(i))))); // past the end: must not compile
|
next(next(next(next(next(i))))); // past the end: must not compile
|
||||||
#endif
|
#endif
|
||||||
|
35
test/sequence/std_tuple_iterator.cpp
Normal file
35
test/sequence/std_tuple_iterator.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
Copyright (c) 2001-2011 Joel de Guzman
|
||||||
|
|
||||||
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
==============================================================================*/
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
// The std_tuple_iterator adaptor only supports implementations
|
||||||
|
// using variadic templates
|
||||||
|
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
|
#include <boost/fusion/adapted/std_tuple.hpp>
|
||||||
|
|
||||||
|
#define FUSION_SEQUENCE std::tuple
|
||||||
|
#define FUSION_TRAVERSAL_TAG random_access_traversal_tag
|
||||||
|
#include "./iterator.hpp"
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
test();
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/*=============================================================================
|
/*=============================================================================
|
||||||
Copyright (c) 2001-2011 Joel de Guzman
|
Copyright (c) 2001-2011 Joel de Guzman
|
||||||
|
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include <boost/fusion/container/vector/vector.hpp>
|
#include <boost/fusion/container/vector/vector.hpp>
|
||||||
|
Reference in New Issue
Block a user