constexpr memeber function not constexpt anymore in v10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following was possible in v9:

template<auto N>
struct A {
    constexpr auto size() const {
        return N;
    }
};

template<typename A>
void foo(const A& a) {
    constexpr auto s = a.size();
}

int main() {
    A<10> x1;
    foo(x1);
}

In v10 this is rejected.

Looks like a bug?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux