Weird, it should be standard C++20. Hope are you invoking gcc?
godbolt link: https://godbolt.org/z/6Tn4Kcjrs
Edit: be sure to call g++, not gcc.
Weird, it should be standard C++20. Hope are you invoking gcc?
godbolt link: https://godbolt.org/z/6Tn4Kcjrs
Edit: be sure to call g++, not gcc.
#include <cmath>
#include <iostream>
#include <numbers>
int main()
{
decltype ( NAN ) f { std::numbers::pi };
std::cout << f << std::endl;
}
“ … and here I forgot an ampersand so the parameter was passed by value instead of by reference and I spent so much time …. Oh. You meant the other kind of bugs, didn’t you?”