Merge pull request #26 from ldionne/master

Improve support for constexpr in fusion::nil and its iterators.
This commit is contained in:
Joel de Guzman
2014-10-28 08:12:04 +08:00
parent c704efb49c
commit d5eb1e793c
4 changed files with 38 additions and 12 deletions

25
test/sequence/nil.cpp Normal file
View 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();
}