Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

isnan_constexpr

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.52 sec, absolute service time: 0,77 sec 
edit mode |  history  | discussion
Error(s):
830561152/source.cpp:7:20: error: constexpr variable 'nan' must be initialized by a constant expression
    constexpr bool nan = std::isnan(300.0);
                   ^     ~~~~~~~~~~~~~~~~~
830561152/source.cpp:7:26: note: non-constexpr function 'isnan<double>' cannot be used in a constant expression
    constexpr bool nan = std::isnan(300.0);
                         ^
/usr/include/c++/v1/math.h:505:1: note: declared here
isnan(_A1 __lcpp_x) _NOEXCEPT
^
1 error generated.

        

    
                
λ
.NET NoSQL database for rapid development