What's the expected behavior of the following code?
With GCC the output is 0, whereas with clang it's 1.
Which one is correct?
#include <iostream>
static const bool ne = false;
struct a
{
a() noexcept(ne) {}
static const bool ne = true;
};
int main()
{
std::cout << noexcept(a()) << std::endl;
}