Debian Codegraph @

libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/lwg4101.cc

raw
1 // { dg-do run }
2 // LWG 4101. LWG 117 loses the sign for negative NaN on some architectures
3
4 #include <sstream>
5 #include <limits>
6 #include <testsuite_hooks.h>
7
8 int main()
9 {
10 float nan = std::numeric_limits<float>::quiet_NaN();
11 std::ostringstream os;
12 os << -nan;
13 VERIFY( os.str()[0] == '-' );
14 }