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()); +}