Skip to content

Conversation

@jkuebart
Copy link

@jkuebart jkuebart commented Jul 30, 2019

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

@jkuebart
Copy link
Author

I have since discovered that the tests expect the invocation as written, hence only the documentation needs to be changed ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant