Work around MSVS 2012 bug with handling of nullptr
Avoid error C2180 given by this compiler for if statements with controlling expression of type nullptr_t.
This commit is contained in:
@@ -858,7 +858,8 @@ template<> struct wxStrtoxCharType<std::nullptr_t>
|
||||
template<typename T>
|
||||
inline double wxStrtod(const wxString& nptr, T endptr)
|
||||
{
|
||||
if (endptr)
|
||||
// Explicit comparison with 0 required when using T=nullptr with MSVS 2012.
|
||||
if (endptr != 0)
|
||||
{
|
||||
// note that it is important to use c_str() here and not mb_str() or
|
||||
// wc_str(), because we store the pointer into (possibly converted)
|
||||
|
Reference in New Issue
Block a user