mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-17 14:22:13 +02:00
Merge pull request #26 from ldionne/master
Improve support for constexpr in fusion::nil and its iterators.
This commit is contained in:
25
test/sequence/nil.cpp
Normal file
25
test/sequence/nil.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2014 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/detail/lightweight_test.hpp>
|
||||
#include <boost/fusion/container/list/cons_iterator.hpp>
|
||||
#include <boost/fusion/container/list/nil.hpp>
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
|
||||
int main() {
|
||||
using namespace boost::fusion;
|
||||
|
||||
// nil should be constexpr constructible
|
||||
{
|
||||
BOOST_CONSTEXPR nil x1 = nil();
|
||||
BOOST_CONSTEXPR nil x2 = nil(nil_iterator(), boost::mpl::true_());
|
||||
(void)x1; (void)x2;
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
Reference in New Issue
Block a user