HoF Problems with Boost 1.68 / LLVM-Clang / Windows
The following two bits of code compile ok with MSVC, but using LLVM/Clang produces the following errors. Using the code in print.cpp BOOST_HOF_STATIC_FUNCTION(simple_print) = fix(first_of( BOOST_HOF_LIFT(print_with_cout), BOOST_HOF_LIFT(print_with_range), BOOST_HOF_LIFT(print_with_tuple) )); produces the following error 1>./boost_hof_functions.h(45): error : templates cannot be declared inside of a local class 1>C:\boost_1_68_0\boost/hof/lift.hpp(90): note: expanded from macro 'BOOST_HOF_LIFT' 1>C:\boost_1_68_0\boost/hof/lift.hpp(105): note: expanded from macro 'BOOST_HOF_LIFT_CLASS' And BOOST_HOF_STATIC_LAMBDA_FUNCTION(print) = boost::hof::proj(simple_print); produces
./boost_hof_functions.h(51): error : non-const lvalue reference to type 'reveal_adaptor<...>' cannot bind to a temporary of type 'reveal_adaptor<...>' 1>C:\boost_1_68_0\boost/hof/lambda.hpp(241): note: expanded from macro 'BOOST_HOF_STATIC_LAMBDA_FUNCTION']
There are nearly identical errors with functions from in.cpp.
On Thu, 20 Sep 2018 at 11:09, Adam Hartshorne via Boost < boost@lists.boost.org> wrote:
The following two bits of code compile ok with MSVC, but using LLVM/Clang produces the following errors.
<snip> Those look like bugs (violations of the std/language) to me, Clang is usually right and rarely wrong. You can go two ways, turn on the msvc compatibility (maybe it passes), or file an issue in the relevant github repo. degski -- *“If something cannot go on forever, it will stop" - Herbert Stein*
participants (2)
-
Adam Hartshorne
-
degski