mirror of
https://github.com/boostorg/metaparse.git
synced 2026-02-01 20:42:20 +00:00
30 lines
687 B
C++
30 lines
687 B
C++
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2011.
|
|
// 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/metaparse/foldl.hpp>
|
|
|
|
#include <boost/mpl/vector.hpp>
|
|
#include <boost/mpl/push_back.hpp>
|
|
#include <boost/mpl/lambda.hpp>
|
|
|
|
using boost::metaparse::foldl;
|
|
|
|
using boost::mpl::vector;
|
|
using boost::mpl::push_back;
|
|
using boost::mpl::_1;
|
|
using boost::mpl::_2;
|
|
using boost::mpl::lambda;
|
|
|
|
namespace
|
|
{
|
|
template <class P>
|
|
struct repeated : foldl<P, vector<>, lambda<push_back<_1, _2> >::type> {};
|
|
}
|
|
|
|
#define TEST_NAME foldl
|
|
|
|
#include "repeated_test.hpp"
|
|
|