Home | History | Annotate | Download | only in string.conversions

Lines Matching full:stod

12 // double stod(const string& str, size_t *idx = 0);
13 // double stod(const wstring& str, size_t *idx = 0);
21 assert(std::stod("0") == 0);
22 assert(std::stod(L"0") == 0);
23 assert(std::stod("-0") == 0);
24 assert(std::stod(L"-0") == 0);
25 assert(std::stod("-10") == -10);
26 assert(std::stod(L"-10.5") == -10.5);
27 assert(std::stod(" 10") == 10);
28 assert(std::stod(L" 10") == 10);
30 assert(std::stod("10g", &idx) == 10);
33 assert(std::stod(L"10g", &idx) == 10);
37 assert(std::stod("1.e60", &idx) == 1.e60);
46 assert(std::stod(L"1.e60", &idx) == 1.e60);
56 assert(std::stod("1.e360", &idx) == INFINITY);
65 assert(std::stod(L"1.e360", &idx) == INFINITY);
74 assert(std::stod("INF", &idx) == INFINITY);
84 assert(std::stod(L"INF", &idx) == INFINITY);
94 assert(std::isnan(std::stod("NAN", &idx)));
104 assert(std::isnan(std::stod(L"NAN", &idx)));
114 std::stod("", &idx);
123 std::stod(L"", &idx);
132 std::stod(" - 8", &idx);
141 std::stod(L" - 8", &idx);
150 std::stod("a1", &idx);
159 std::stod(L"a1", &idx);