Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-type template argument is not a constant expression #2

Open
chlict opened this issue Apr 6, 2020 · 0 comments
Open

non-type template argument is not a constant expression #2

chlict opened this issue Apr 6, 2020 · 0 comments

Comments

@chlict
Copy link
Owner

chlict commented Apr 6, 2020

rev: f79f4ac
Compile error:

AllocTensor.hpp:49:81: error: non-type template argument is not a constant expression
        static_assert(hana::contains(decltype(hana::keys(map))(), hana::llong_c<lhs.getI()>));

Source code:

    if constexpr (is_temp<std::remove_reference_t<Lhs> >) {
        static_assert(hana::contains(decltype(hana::keys(map))(), hana::llong_c<lhs.getI()>));
    }

lhs.getI()是个temp_placeholder<1> &,lhs.getI()也是constexpr返回类型的函数,但是编译器不能正确识别。

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

No branches or pull requests

1 participant