#include <cstdlib>
#include <cerrno>
#include <boost/lexical_cast.hpp>
#include <boost/logic/tribool.hpp>
Go to the source code of this file.
◆ STRTOD
#define STRTOD |
( |
|
x, |
|
|
|
y |
|
) |
| strtod((x), (y)) |
◆ ATOF
#define ATOF |
( |
|
x | ) |
atof(x) |
◆ OPTIMIZED_LEXICAL_CAST
#define OPTIMIZED_LEXICAL_CAST |
( |
|
toType | ) |
|
Value: template<> inline toType lexical_cast(const std::string& str) { \
bool success; \
toType value = lexical_cast<toType>(str, success); \
if (!success) \
throw bad_lexical_cast(); \
return value; \
}
Definition at line 57 of file optimized_lexical_cast.hpp.
58 { \
59 bool success; \
60 toType
value = lexical_cast<toType>(str, success); \
61 if (!success) \
62 throw bad_lexical_cast(); \
64 }
PWIZ_API_DECL std::string value(const std::string &id, const std::string &name)
convenience function to extract a named value from an id string