Remove u8 prefix in string literals. (#172)
String literals with the prefix `u8` now have the type `const char8_t[N]` in C++20. As a consequence the library does not compile in c++2a mode with GCC (you can't concatenate `std::basic_string<char>` and `const char8_t[]` as `char` and `char8_t` are different types).
This commit is contained in:
parent
3876c09072
commit
48e265dc4b
@ -354,7 +354,7 @@ namespace cxxopts
|
||||
{
|
||||
public:
|
||||
option_exists_error(const std::string& option)
|
||||
: OptionSpecException(u8"Option " + LQUOTE + option + RQUOTE + u8" already exists")
|
||||
: OptionSpecException("Option " + LQUOTE + option + RQUOTE + " already exists")
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -363,7 +363,7 @@ namespace cxxopts
|
||||
{
|
||||
public:
|
||||
invalid_option_format_error(const std::string& format)
|
||||
: OptionSpecException(u8"Invalid option format " + LQUOTE + format + RQUOTE)
|
||||
: OptionSpecException("Invalid option format " + LQUOTE + format + RQUOTE)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -371,8 +371,8 @@ namespace cxxopts
|
||||
class option_syntax_exception : public OptionParseException {
|
||||
public:
|
||||
option_syntax_exception(const std::string& text)
|
||||
: OptionParseException(u8"Argument " + LQUOTE + text + RQUOTE +
|
||||
u8" starts with a - but has incorrect syntax")
|
||||
: OptionParseException("Argument " + LQUOTE + text + RQUOTE +
|
||||
" starts with a - but has incorrect syntax")
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -381,7 +381,7 @@ namespace cxxopts
|
||||
{
|
||||
public:
|
||||
option_not_exists_exception(const std::string& option)
|
||||
: OptionParseException(u8"Option " + LQUOTE + option + RQUOTE + u8" does not exist")
|
||||
: OptionParseException("Option " + LQUOTE + option + RQUOTE + " does not exist")
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -391,7 +391,7 @@ namespace cxxopts
|
||||
public:
|
||||
missing_argument_exception(const std::string& option)
|
||||
: OptionParseException(
|
||||
u8"Option " + LQUOTE + option + RQUOTE + u8" is missing an argument"
|
||||
"Option " + LQUOTE + option + RQUOTE + " is missing an argument"
|
||||
)
|
||||
{
|
||||
}
|
||||
@ -402,7 +402,7 @@ namespace cxxopts
|
||||
public:
|
||||
option_requires_argument_exception(const std::string& option)
|
||||
: OptionParseException(
|
||||
u8"Option " + LQUOTE + option + RQUOTE + u8" requires an argument"
|
||||
"Option " + LQUOTE + option + RQUOTE + " requires an argument"
|
||||
)
|
||||
{
|
||||
}
|
||||
@ -417,8 +417,8 @@ namespace cxxopts
|
||||
const std::string& arg
|
||||
)
|
||||
: OptionParseException(
|
||||
u8"Option " + LQUOTE + option + RQUOTE +
|
||||
u8" does not take an argument, but argument " +
|
||||
"Option " + LQUOTE + option + RQUOTE +
|
||||
" does not take an argument, but argument " +
|
||||
LQUOTE + arg + RQUOTE + " given"
|
||||
)
|
||||
{
|
||||
@ -429,7 +429,7 @@ namespace cxxopts
|
||||
{
|
||||
public:
|
||||
option_not_present_exception(const std::string& option)
|
||||
: OptionParseException(u8"Option " + LQUOTE + option + RQUOTE + u8" not present")
|
||||
: OptionParseException("Option " + LQUOTE + option + RQUOTE + " not present")
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -442,7 +442,7 @@ namespace cxxopts
|
||||
const std::string& arg
|
||||
)
|
||||
: OptionParseException(
|
||||
u8"Argument " + LQUOTE + arg + RQUOTE + u8" failed to parse"
|
||||
"Argument " + LQUOTE + arg + RQUOTE + " failed to parse"
|
||||
)
|
||||
{
|
||||
}
|
||||
@ -453,7 +453,7 @@ namespace cxxopts
|
||||
public:
|
||||
option_required_exception(const std::string& option)
|
||||
: OptionParseException(
|
||||
u8"Option " + LQUOTE + option + RQUOTE + u8" is required but not present"
|
||||
"Option " + LQUOTE + option + RQUOTE + " is required but not present"
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user