Remove use of deprecated behavior involving copy members

*  If any of the destructor, copy assignment or copy constructor
   are user-declared, both copy members should be user-declared,
   otherwise the compiler-generation of them is deprecated.
This commit is contained in:
Howard Hinnant
2017-09-05 15:23:47 -04:00
committed by seelabs
parent 16acba1636
commit 4e6c8d8b35
15 changed files with 56 additions and 11 deletions

View File

@@ -161,6 +161,7 @@ struct FlowDebugInfo
auto const end = FlowDebugInfo::clock::now ();
info->timePoints[tag].second = end;
}
Stopper(Stopper&&) = default;
};
return Stopper (std::move (name), *this);
}

View File

@@ -61,6 +61,7 @@ public:
{
}
PreflightResult(PreflightResult const&) = default;
/// Deleted copy assignment operator
PreflightResult& operator=(PreflightResult const&) = delete;
};
@@ -114,6 +115,7 @@ public:
{
}
PreclaimResult(PreclaimResult const&) = default;
/// Deleted copy assignment operator
PreclaimResult& operator=(PreclaimResult const&) = delete;
};

View File

@@ -112,6 +112,8 @@ public:
getCounter ().increment ();
}
CountedObject& operator=(CountedObject const&) = default;
~CountedObject ()
{
getCounter ().decrement ();

View File

@@ -66,6 +66,8 @@ public:
static bool const is_steady = Clock::is_steady;
virtual ~abstract_clock() = default;
abstract_clock() = default;
abstract_clock(abstract_clock const&) = default;
/** Returns the current time. */
virtual time_point now() const = 0;

View File

@@ -51,15 +51,7 @@ class aged_container_iterator
public:
using time_point = typename Iterator::value_type::stashed::time_point;
// Could be '= default', but Visual Studio 2013 chokes on it [Aug 2014]
aged_container_iterator ()
{
}
// copy constructor
aged_container_iterator (
aged_container_iterator<is_const, Iterator, Base>
const& other) = default;
aged_container_iterator() = default;
// Disable constructing a const_iterator from a non-const_iterator.
// Converting between reverse and non-reverse iterators should be explicit.

View File

@@ -30,6 +30,9 @@ class Base
{
public:
virtual ~Base () = 0;
Base() = default;
Base(Base const&) = default;
Base& operator=(Base const&) = default;
};
}

View File

@@ -28,6 +28,11 @@
This module requires the @ref beast_sqlite external module.
*/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
#include <ripple/basics/Log.h>
#include <ripple/core/JobQueue.h>
#define SOCI_USE_BOOST
@@ -138,4 +143,8 @@ std::unique_ptr <Checkpointer> makeCheckpointer (soci::session&, JobQueue&, Logs
#include "version.h"
#endif
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif

View File

@@ -24,6 +24,11 @@
header file and some macros to be defined.)
*/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
#include <BeastConfig.h>
#include <ripple/basics/contract.h>
#include <ripple/core/SociDB.h>
@@ -57,3 +62,6 @@ void unload_all (){};
} // namespace dynamic_backends
} // namespace soci
#if defined(__clang__)
#pragma clang diagnostic pop
#endif

View File

@@ -17,6 +17,11 @@
*/
//==============================================================================
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
#include <BeastConfig.h>
#include <ripple/basics/contract.h>
@@ -271,3 +276,7 @@ std::unique_ptr <Checkpointer> makeCheckpointer (
}
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif

View File

@@ -38,6 +38,9 @@ class RawView
{
public:
virtual ~RawView() = default;
RawView() = default;
RawView(RawView const&) = default;
RawView& operator=(RawView const&) = delete;
/** Delete an existing state item.

View File

@@ -67,6 +67,7 @@ public:
virtual ~STBase() = default;
STBase(const STBase& t) = default;
STBase& operator= (const STBase& t);
bool operator== (const STBase& t) const;

View File

@@ -98,6 +98,7 @@ private:
typename T::value_type;
public:
ValueProxy(ValueProxy const&) = default;
ValueProxy& operator= (ValueProxy const&) = delete;
template <class U>
@@ -125,6 +126,7 @@ private:
typename std::decay<value_type>::type>;
public:
OptionalProxy(OptionalProxy const&) = default;
OptionalProxy& operator= (OptionalProxy const&) = delete;
/** Returns `true` if the field is set.

View File

@@ -118,6 +118,7 @@ public:
}
STPathElement(STPathElement const&) = default;
STPathElement& operator=(STPathElement const&) = default;
int
getNodeType () const

View File

@@ -16,6 +16,12 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
#include <BeastConfig.h>
// Core soci
@@ -50,3 +56,7 @@
#include <core/blob.cpp>
#include <backends/sqlite3/blob.cpp>
#if defined(__clang__)
#pragma clang diagnostic pop
#endif