Merge branch 'cmake-c++11-stl' of git://github.com/MaartenBent/wxWidgets
CMake: Improve STL checks, improve C++17/20 support. See https://github.com/wxWidgets/wxWidgets/pull/1782 Closes #18718.
This commit is contained in:
@@ -38,9 +38,9 @@ public:
|
||||
wxAnimation();
|
||||
explicit wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
wxAnimation(const wxAnimation&) = default;
|
||||
wxAnimation& operator=(const wxAnimation&) = default;
|
||||
#ifdef wxHAS_MEMBER_DEFAULT
|
||||
wxAnimation(const wxAnimation&) wxMEMBER_DEFAULT;
|
||||
wxAnimation& operator=(const wxAnimation&) wxMEMBER_DEFAULT;
|
||||
#endif
|
||||
|
||||
bool IsOk() const;
|
||||
|
@@ -285,6 +285,14 @@ typedef short int WXTYPE;
|
||||
#define wxOVERRIDE
|
||||
#endif /* HAVE_OVERRIDE */
|
||||
|
||||
/* same for defaulted member function keyword */
|
||||
#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(14)
|
||||
#define wxHAS_MEMBER_DEFAULT
|
||||
#define wxMEMBER_DEFAULT = default
|
||||
#else
|
||||
#define wxMEMBER_DEFAULT
|
||||
#endif
|
||||
|
||||
/*
|
||||
Support for nullptr is available since MSVS 2010, even though it doesn't
|
||||
define __cplusplus as a C++11 compiler.
|
||||
@@ -2994,7 +3002,7 @@ typedef const void* WXWidget;
|
||||
/* macros to define a class without copy ctor nor assignment operator */
|
||||
/* --------------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__cplusplus) && __cplusplus >= 201103L
|
||||
#if defined(__cplusplus) && (__cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(14))
|
||||
#define wxMEMBER_DELETE = delete
|
||||
#else
|
||||
#define wxMEMBER_DELETE
|
||||
|
@@ -66,11 +66,9 @@ public:
|
||||
|
||||
operator HSTRING() const { return m_hstring; };
|
||||
|
||||
static const TempStringRef Make(const wxString &str);
|
||||
TempStringRef(const wxString& str);
|
||||
|
||||
private:
|
||||
TempStringRef(const wxString &str);
|
||||
|
||||
HSTRING m_hstring;
|
||||
HSTRING_HEADER m_header;
|
||||
|
||||
|
@@ -267,8 +267,8 @@ public:
|
||||
wxUniCharRef& operator=(const wxUniCharRef& c)
|
||||
{ if (&c != this) *this = c.UniChar(); return *this; }
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
wxUniCharRef(const wxUniCharRef&) = default;
|
||||
#ifdef wxHAS_MEMBER_DEFAULT
|
||||
wxUniCharRef(const wxUniCharRef&) wxMEMBER_DEFAULT;
|
||||
#endif
|
||||
|
||||
#define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \
|
||||
|
Reference in New Issue
Block a user