mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-23 09:07:26 +02:00
Allow incomplete types in fusion::tag_of and fusion::is_native_fusion_sequence
This commit is contained in:
17
test/support/is_sequence.cpp
Normal file
17
test/support/is_sequence.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2018 Louis Dionne
|
||||
|
||||
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/fusion/support/is_sequence.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
|
||||
// Make sure fusion::is_sequence and fusion::is_native_fusion_sequence can be
|
||||
// used with an incomplete type.
|
||||
struct incomplete;
|
||||
BOOST_STATIC_ASSERT(!boost::fusion::traits::is_sequence<incomplete>::value);
|
||||
BOOST_STATIC_ASSERT(!boost::fusion::traits::is_native_fusion_sequence<incomplete>::value);
|
||||
|
||||
int main() { }
|
17
test/support/tag_of.cpp
Normal file
17
test/support/tag_of.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2018 Louis Dionne
|
||||
|
||||
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/fusion/support/tag_of.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
// Make sure tag_of can be used with an incomplete type.
|
||||
struct incomplete;
|
||||
typedef boost::fusion::traits::tag_of<incomplete>::type Tag;
|
||||
BOOST_STATIC_ASSERT((boost::is_same<Tag, boost::fusion::non_fusion_tag>::value));
|
||||
|
||||
int main() { }
|
Reference in New Issue
Block a user