mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
Source: fix more rule of 3 warnings from clang -Wdeprecated
This commit is contained in:
+30
-18
@@ -101,14 +101,18 @@ public:
|
|||||||
class ConfigurePreset : public Preset
|
class ConfigurePreset : public Preset
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
|
ConfigurePreset() = default;
|
||||||
|
ConfigurePreset(ConfigurePreset&& /*other*/) = default;
|
||||||
|
ConfigurePreset(const ConfigurePreset& /*other*/) = default;
|
||||||
|
ConfigurePreset& operator=(const ConfigurePreset& /*other*/) = default;
|
||||||
|
~ConfigurePreset() override = default;
|
||||||
|
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
|
||||||
|
ConfigurePreset& operator=(ConfigurePreset&& /*other*/) = default;
|
||||||
|
#else
|
||||||
// The move assignment operators for several STL classes did not become
|
// The move assignment operators for several STL classes did not become
|
||||||
// noexcept until C++17, which causes some tools to warn about this move
|
// noexcept until C++17, which causes some tools to warn about this move
|
||||||
// assignment operator throwing an exception when it shouldn't. Disable the
|
// assignment operator throwing an exception when it shouldn't.
|
||||||
// move assignment operator until C++17 is enabled.
|
ConfigurePreset& operator=(ConfigurePreset&& /*other*/) = delete;
|
||||||
// Explicitly defining a copy assignment operator prevents the compiler
|
|
||||||
// from automatically generating a move assignment operator.
|
|
||||||
ConfigurePreset& operator=(const ConfigurePreset& /*other*/) = default;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string Generator;
|
std::string Generator;
|
||||||
@@ -142,14 +146,18 @@ public:
|
|||||||
class BuildPreset : public Preset
|
class BuildPreset : public Preset
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
|
BuildPreset() = default;
|
||||||
|
BuildPreset(BuildPreset&& /*other*/) = default;
|
||||||
|
BuildPreset(const BuildPreset& /*other*/) = default;
|
||||||
|
BuildPreset& operator=(const BuildPreset& /*other*/) = default;
|
||||||
|
~BuildPreset() override = default;
|
||||||
|
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
|
||||||
|
BuildPreset& operator=(BuildPreset&& /*other*/) = default;
|
||||||
|
#else
|
||||||
// The move assignment operators for several STL classes did not become
|
// The move assignment operators for several STL classes did not become
|
||||||
// noexcept until C++17, which causes some tools to warn about this move
|
// noexcept until C++17, which causes some tools to warn about this move
|
||||||
// assignment operator throwing an exception when it shouldn't. Disable the
|
// assignment operator throwing an exception when it shouldn't.
|
||||||
// move assignment operator until C++17 is enabled.
|
BuildPreset& operator=(BuildPreset&& /*other*/) = delete;
|
||||||
// Explicitly defining a copy assignment operator prevents the compiler
|
|
||||||
// from automatically generating a move assignment operator.
|
|
||||||
BuildPreset& operator=(const BuildPreset& /*other*/) = default;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string ConfigurePreset;
|
std::string ConfigurePreset;
|
||||||
@@ -168,14 +176,18 @@ public:
|
|||||||
class TestPreset : public Preset
|
class TestPreset : public Preset
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
|
TestPreset() = default;
|
||||||
|
TestPreset(TestPreset&& /*other*/) = default;
|
||||||
|
TestPreset(const TestPreset& /*other*/) = default;
|
||||||
|
TestPreset& operator=(const TestPreset& /*other*/) = default;
|
||||||
|
~TestPreset() override = default;
|
||||||
|
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
|
||||||
|
TestPreset& operator=(TestPreset&& /*other*/) = default;
|
||||||
|
#else
|
||||||
// The move assignment operators for several STL classes did not become
|
// The move assignment operators for several STL classes did not become
|
||||||
// noexcept until C++17, which causes some tools to warn about this move
|
// noexcept until C++17, which causes some tools to warn about this move
|
||||||
// assignment operator throwing an exception when it shouldn't. Disable the
|
// assignment operator throwing an exception when it shouldn't.
|
||||||
// move assignment operator until C++17 is enabled.
|
TestPreset& operator=(TestPreset&& /*other*/) = delete;
|
||||||
// Explicitly defining a copy assignment operator prevents the compiler
|
|
||||||
// from automatically generating a move assignment operator.
|
|
||||||
TestPreset& operator=(const TestPreset& /*other*/) = default;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct OutputOptions
|
struct OutputOptions
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class cmXMLParser
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmXMLParser();
|
cmXMLParser();
|
||||||
|
cmXMLParser(const cmXMLParser& /*other*/) = default;
|
||||||
virtual ~cmXMLParser();
|
virtual ~cmXMLParser();
|
||||||
|
|
||||||
//! Parse given XML string
|
//! Parse given XML string
|
||||||
|
|||||||
Reference in New Issue
Block a user