27 size_t res = strtoul(
a.c_str(), &endptr, 10);
29 if (
a.empty() || *endptr !=
'\0') {
36 #ifndef MSVC_DO_UNIT_TESTS
41 size_t res = strtoul(
a, &endptr, 10);
43 if (*
a ==
'\0' || *endptr !=
'\0') {
51 size_t lexical_cast_default<size_t, const std::string&>(
const std::string&
a,
size_t def)
58 size_t res = strtoul(
a.c_str(), &endptr, 10);
60 if (*endptr !=
'\0') {
74 size_t res = strtoul(
a, &endptr, 10);
76 if (*endptr !=
'\0') {
86 long res = strtol(
a.c_str(), &endptr, 10);
88 if (
a.empty() || *endptr !=
'\0') {
99 long res = strtol(
a, &endptr, 10);
101 if (*
a ==
'\0' || *endptr !=
'\0') {
108 long lexical_cast_default<long, const std::string&>(
const std::string&
a,
long def)
115 long res = strtol(
a.c_str(), &endptr, 10);
117 if (*endptr !=
'\0') {
131 long res = strtol(
a, &endptr, 10);
133 if (*endptr !=
'\0') {
143 int res = strtol(
a.c_str(), &endptr, 10);
145 if (
a.empty() || *endptr !=
'\0') {
152 #ifndef MSVC_DO_UNIT_TESTS
157 int res = strtol(
a, &endptr, 10);
159 if (*
a ==
'\0' || *endptr !=
'\0') {
168 int lexical_cast_default<int, const std::string&>(
const std::string&
a,
int def)
175 int res = strtol(
a.c_str(), &endptr, 10);
177 if (*endptr !=
'\0') {
192 int res = strtol(
a, &endptr, 10);
194 if (*endptr !=
'\0') {
205 double res = strtod(
a.c_str(), &endptr);
207 if (
a.empty() || *endptr !=
'\0') {
218 double res = strtod(
a, &endptr);
220 if (*
a ==
'\0' || *endptr !=
'\0') {
228 double lexical_cast_default<double, const std::string&>(
const std::string&
a,
double def)
231 double res = strtod(
a.c_str(), &endptr);
233 if (
a.empty() || *endptr !=
'\0') {
244 double res = strtod(
a, &endptr);
246 if (*
a ==
'\0' || *endptr !=
'\0') {
257 float res =
static_cast<float>(strtod(
a.c_str(), &endptr));
259 if (
a.empty() || *endptr !=
'\0') {
270 float res =
static_cast<float>(strtod(
a, &endptr));
272 if (*
a ==
'\0' || *endptr !=
'\0') {
279 float lexical_cast_default<float, const std::string&>(
const std::string&
a,
float def)
282 float res =
static_cast<float>(strtod(
a.c_str(), &endptr));
284 if (
a.empty() || *endptr !=
'\0') {
295 float res =
static_cast<float>(strtod(
a, &endptr));
297 if (*
a ==
'\0' || *endptr !=
'\0') {
int lexical_cast_default< int, const char * >(const char *a, int def)
To lexical_cast(From value)
Lexical cast converts one type to another.
size_t lexical_cast_default< size_t, const char * >(const char *a, size_t def)
GLboolean GLboolean GLboolean GLboolean a
long lexical_cast_default< long, const char * >(const char *a, long def)
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
Templates and utility-routines for strings and numbers.
float lexical_cast_default< float, const char * >(const char *a, float def)
double lexical_cast_default< double, const char * >(const char *a, double def)
Thrown when a lexical_cast fails.
GLsizei const GLcharARB ** string