Skip to content

pack expansion vexations #44

@ericniebler

Description

@ericniebler
#include <meta/meta.hpp>

struct is_positive {
    template<typename N>
    using invoke = meta::bool_<(N::type::value > 0)>;
};

using list = meta::list<
    meta::int_<1>,
    meta::int_<2>,
    meta::int_<3>,
    meta::int_<4>
>;

using result = meta::all_of<list, is_positive>;

...results in:

In file included from /Users/eniebler/Code/range-v3/scratch/scratch.cpp:5:
/Users/eniebler/Code/range-v3/include/meta/meta.hpp:560:9: error: pack expansion used as argument for non-pack parameter of alias template
        using invoke = typename F::template invoke<Args...>;
        ^~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions