Avoid initialization from non-constexpr
In-class initializers for "static const" class members must be constexpr, however std::string is only "static const" itself and cannot be used without compiler extensions.
This commit is contained in:
parent
2f8e60352b
commit
eaa31dc11b
|
@ -145,7 +145,9 @@ public:
|
|||
return (UTF8&) *this;
|
||||
}
|
||||
|
||||
static const std::string::size_type npos = std::string::npos;
|
||||
// std::string::npos is not constexpr, so we can't use it in an
|
||||
// initializer.
|
||||
static constexpr std::string::size_type npos = -1;
|
||||
|
||||
UTF8& operator=( const wxString& o );
|
||||
|
||||
|
|
Loading…
Reference in New Issue