CppCMS

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

convert.h
1 #ifndef BOOSTER_NOWIDE_CONVERT_H
2 #define BOOSTER_NOWIDE_CONVERT_H
3
4 #include <booster/config.h>
5 #include <booster/backtrace.h>
6
7 #if defined(BOOSTER_WIN_NATIVE) || defined(BOOSTER_DOXYGEN_DOCS)
8 namespace booster {
9 namespace nowide {
10
14 class BOOSTER_API bad_utf : public booster::runtime_error {
15 public:
16 bad_utf();
17 };
18
22 BOOSTER_API std::string convert(wchar_t const *s);
26 BOOSTER_API std::wstring convert(char const *s);
30 inline std::string convert(std::wstring const &s)
31 {
32 return convert(s.c_str());
33 }
37 inline std::wstring convert(std::string const &s)
38 {
39 return convert(s.c_str());
40 }
41
42 } // nowide
43 } // booster
44 #endif
45
46 #endif
booster::runtime_error
Same as std::runtime_error but records stack trace.
Definition: backtrace.h:158
booster::nowide::convert
BOOSTER_API std::string convert(wchar_t const *s)
booster
Booster library namespace. The library that implements Boost Like API in ABI backward compatible way...
Definition: application.h:23
booster::nowide::bad_utf
This exception is thrown if invalid UTF-8 or UTF-16 is given as input.
Definition: convert.h:14