I believe there's an error in the reverse_fold implementation in case META_CONCEPT is not set. compose1_ as defined by fold passes the functor's argument as the first argument to the function. Where compose1_ is used in the implementation of reverse_fold, I believe we want to pass it on as the second function argument. Anyway, that's how I interpret Fun(A_N, State_N+1) in the documentation.
Without this change, I get
In file included from examples/calc/calc.cc:1:
meta/include/meta/meta.hpp:141:5: error: no type named 'type' in 'meta::detail::reverse_fold_<meta::list<…>, meta::list<>, (anonymous namespace)::CollectProductions<(anonymous namespace)::Expr> >'
using _t = typename T::type;
^~~~~
My compiler is
$ c++ --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I believe there's an error in the
reverse_fold
implementation in caseMETA_CONCEPT
is not set.compose1_
as defined byfold
passes the functor's argument as the first argument to the function. Wherecompose1_
is used in the implementation ofreverse_fold
, I believe we want to pass it on as the second function argument. Anyway, that's how I interpretFun(A_N, State_N+1)
in the documentation.Without this change, I get
My compiler is