From 77959b1d334ba516722bc25c5e4c957f67c92010 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Sat, 7 Jul 2018 01:23:11 +0900 Subject: [PATCH] test: Added test for ticket 5490 --- test/Jamfile | 1 + test/algorithm/ticket-5490.cpp | 38 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 test/algorithm/ticket-5490.cpp diff --git a/test/Jamfile b/test/Jamfile index 9289033c..c880b984 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -66,6 +66,7 @@ project [ run algorithm/zip2.cpp ] [ run algorithm/zip_ignore.cpp ] [ run algorithm/flatten.cpp ] + [ compile algorithm/ticket-5490.cpp ] [ run sequence/as_deque.cpp ] [ run sequence/as_list.cpp ] diff --git a/test/algorithm/ticket-5490.cpp b/test/algorithm/ticket-5490.cpp new file mode 100644 index 00000000..dee27ef6 --- /dev/null +++ b/test/algorithm/ticket-5490.cpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2018 Kohei Takahashi + + 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 +#include +#include +#include + +using namespace boost::fusion; + +template +struct predicate {}; + +struct unique {}; + +template +struct meta_func +{ + typedef unique result_type; + + template + unique operator()(const T&) const; +}; + +int main() +{ + vector v; + + typedef predicate lambda_t; + typedef boost::mpl::quote1 quote_t; + + vector l = transform(v, meta_func()); + + vector q = transform(v, meta_func()); +}