Get *=default*ed default constructors
authorPraveen Kumar <cpp.fool@gmail.com>
Fri, 12 Jun 2015 21:44:21 +0000 (14:44 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 12 Jun 2015 21:54:35 +0000 (14:54 -0700)
Summary: Defaulted (*=default*ed) default constructors are better
because they can be constexpr and/or noexcept when C++ Standard
thinks it is right to do so. And they remain user-declared rather
than user-provided. Regarding *=default*ed default constructor,
benifit is that the work might be done during compilation and we
might not need to worry about exception paths. And for destructors,
apart from that that =defaulted definition is in sync with defaulted
default constructor we might discover that in some cases "() {}" might
be ill-formed when "= default;" compiltion indicates so. If =defaulted
definition for destructor doesn't do any harm then why not go for it.

Closes #216

Reviewed By: @yfeldblum

Differential Revision: D2145322

Pulled By: @sgolemon

53 files changed:
folly/Arena.h
folly/AtomicHashArray.h
folly/AtomicHashMap.h
folly/ExceptionWrapper.h
folly/GroupVarint.h
folly/MPMCPipeline.h
folly/MemoryMapping.h
folly/Singleton.h
folly/SmallLocks.h
folly/SocketAddress.h
folly/Subprocess.h
folly/ThreadLocal.h
folly/dynamic.cpp
folly/experimental/JSONSchema.cpp
folly/experimental/StringKeyedUnorderedMap.h
folly/gen/Base-inl.h
folly/gen/Combine-inl.h
folly/gen/Core-inl.h
folly/gen/Parallel-inl.h
folly/gen/ParallelMap-inl.h
folly/io/async/AsyncSSLSocket.h
folly/io/async/AsyncServerSocket.h
folly/io/async/AsyncSocket.cpp
folly/io/async/AsyncSocket.h
folly/io/async/AsyncTransport.h
folly/io/async/AsyncUDPServerSocket.h
folly/io/async/AsyncUDPSocket.h
folly/io/async/DelayedDestruction.h
folly/io/async/EventBase.h
folly/io/async/Request.h
folly/io/async/SSLContext.h
folly/io/async/TimeoutManager.h
folly/small_vector.h
folly/wangle/acceptor/ConnectionCounter.h
folly/wangle/acceptor/ConnectionManager.h
folly/wangle/acceptor/LoadShedConfiguration.h
folly/wangle/acceptor/ManagedConnection.h
folly/wangle/bootstrap/ClientBootstrap.h
folly/wangle/bootstrap/ServerBootstrap-inl.h
folly/wangle/bootstrap/ServerBootstrap.h
folly/wangle/channel/Handler.h
folly/wangle/channel/HandlerContext-inl.h
folly/wangle/channel/HandlerContext.h
folly/wangle/channel/Pipeline.h
folly/wangle/concurrent/BlockingQueue.h
folly/wangle/concurrent/IOExecutor.h
folly/wangle/concurrent/ThreadFactory.h
folly/wangle/concurrent/ThreadPoolExecutor.h
folly/wangle/rx/Subscription.h
folly/wangle/service/Service.h
folly/wangle/ssl/SSLCacheProvider.h
folly/wangle/ssl/SSLContextConfig.h
folly/wangle/ssl/SSLContextManager.cpp

index f2af34e477556d1c74f6d5c28c897097f4624373..5121e380098d9c556ab0922514a5216aec636bf3 100644 (file)
@@ -148,8 +148,8 @@ class Arena {
     }
 
    private:
     }
 
    private:
-    Block() { }
-    ~Block() { }
+    Block() = default;
+    ~Block() = default;
   } __attribute__((__aligned__));
   // This should be alignas(std::max_align_t) but neither alignas nor
   // max_align_t are supported by gcc 4.6.2.
   } __attribute__((__aligned__));
   // This should be alignas(std::max_align_t) but neither alignas nor
   // max_align_t are supported by gcc 4.6.2.
index 87f8b060d8ad39f8bc66785e55de04efd1485321..bbb3cdd4a332ca14ffb143a600c4dc822660f9a9 100644 (file)
@@ -232,7 +232,7 @@ class AtomicHashArray : boost::noncopyable {
 
   struct SimpleRetT { size_t idx; bool success;
     SimpleRetT(size_t i, bool s) : idx(i), success(s) {}
 
   struct SimpleRetT { size_t idx; bool success;
     SimpleRetT(size_t i, bool s) : idx(i), success(s) {}
-    SimpleRetT() {}
+    SimpleRetT() = default;
   };
 
   template <class T>
   };
 
   template <class T>
@@ -277,7 +277,7 @@ class AtomicHashArray : boost::noncopyable {
   AtomicHashArray(size_t capacity, KeyT emptyKey, KeyT lockedKey,
                   KeyT erasedKey, double maxLoadFactor, size_t cacheSize);
 
   AtomicHashArray(size_t capacity, KeyT emptyKey, KeyT lockedKey,
                   KeyT erasedKey, double maxLoadFactor, size_t cacheSize);
 
-  ~AtomicHashArray() {}
+  ~AtomicHashArray() = default;
 
   inline void unlockCell(value_type* const cell, KeyT newKey) {
     cellKeyPtr(*cell)->store(newKey, std::memory_order_release);
 
   inline void unlockCell(value_type* const cell, KeyT newKey) {
     cellKeyPtr(*cell)->store(newKey, std::memory_order_release);
index f0b04a56366c2b1a3dbf3cf9f6a458fa494e6787..5b58feea1fccd1786a020583fd88a3d98e0c451b 100644 (file)
@@ -389,7 +389,7 @@ class AtomicHashMap : boost::noncopyable {
 
   struct SimpleRetT { uint32_t i; size_t j; bool success;
     SimpleRetT(uint32_t ii, size_t jj, bool s) : i(ii), j(jj), success(s) {}
 
   struct SimpleRetT { uint32_t i; size_t j; bool success;
     SimpleRetT(uint32_t ii, size_t jj, bool s) : i(ii), j(jj), success(s) {}
-    SimpleRetT() {}
+    SimpleRetT() = default;
   };
 
   template <class T>
   };
 
   template <class T>
index 3f9f9688f754f8ce47a389a6308fca1d5a9b532e..a99e84d95a8f35e9deb95665275efe28130fa47a 100644 (file)
@@ -434,7 +434,7 @@ class try_and_catch<LastException, Exceptions...> :
 template<>
 class try_and_catch<> : public exception_wrapper {
  public:
 template<>
 class try_and_catch<> : public exception_wrapper {
  public:
-  try_and_catch() {}
+  try_and_catch() = default;
 
  protected:
   template <typename F>
 
  protected:
   template <typename F>
index d7ebd0ddd4560983aaf2d74cb905b5cd33886fc8..f50617cb7c7003f2b3b666bf878c473a7cbaf560 100644 (file)
@@ -512,7 +512,7 @@ class GroupVarintDecoder {
   typedef GroupVarint<T> Base;
   typedef T type;
 
   typedef GroupVarint<T> Base;
   typedef T type;
 
-  GroupVarintDecoder() { }
+  GroupVarintDecoder() = default;
 
   explicit GroupVarintDecoder(StringPiece data,
                               size_t maxCount = (size_t)-1)
 
   explicit GroupVarintDecoder(StringPiece data,
                               size_t maxCount = (size_t)-1)
index dc42244159c0f39c231f5ea8f30069f794eca242..d480c16700cd9ad8e575bd678369f1b7f7349a8a 100644 (file)
@@ -176,7 +176,7 @@ template <class In, class... Stages> class MPMCPipeline {
    * Default-construct pipeline. Useful to move-assign later,
    * just like MPMCQueue, see MPMCQueue.h for more details.
    */
    * Default-construct pipeline. Useful to move-assign later,
    * just like MPMCQueue, see MPMCQueue.h for more details.
    */
-  MPMCPipeline() { }
+  MPMCPipeline() = default;
 
   /**
    * Construct a pipeline with N+1 queue sizes.
 
   /**
    * Construct a pipeline with N+1 queue sizes.
index a1ca74440ae1a247ba76029e885894025939a2dd..280a261fd6407c14d596dd419f57310e5951f694 100644 (file)
@@ -53,7 +53,7 @@ class MemoryMapping : boost::noncopyable {
    * likely become inaccessible) when the MemoryMapping object is destroyed.
    */
   struct Options {
    * likely become inaccessible) when the MemoryMapping object is destroyed.
    */
   struct Options {
-    Options() { }
+    Options() {}
 
     // Convenience methods; return *this for chaining.
     Options& setPageSize(off_t v) { pageSize = v; return *this; }
 
     // Convenience methods; return *this for chaining.
     Options& setPageSize(off_t v) { pageSize = v; return *this; }
index 8eff26f22a8b923aace0e14a9375b980a042582d..88eed3426b302c03479d01477a3a32c208bfcc2f 100644 (file)
@@ -188,7 +188,7 @@ class TypeDescriptorHasher {
 // SingletonHolders.
 class SingletonHolderBase {
  public:
 // SingletonHolders.
 class SingletonHolderBase {
  public:
-  virtual ~SingletonHolderBase() {}
+  virtual ~SingletonHolderBase() = default;
 
   virtual TypeDescriptor type() = 0;
   virtual bool hasLiveInstance() = 0;
 
   virtual TypeDescriptor type() = 0;
   virtual bool hasLiveInstance() = 0;
index 3702afe368837764655566805e5dfbb024abce81..6e7d68d1c73c5ba56e3cab3191874cffd30897e4 100644 (file)
@@ -295,7 +295,7 @@ struct SpinLockArray {
 
  private:
   struct PaddedSpinLock {
 
  private:
   struct PaddedSpinLock {
-    PaddedSpinLock() : lock() { }
+    PaddedSpinLock() : lock() {}
     T lock;
     char padding[FOLLY_CACHE_LINE_SIZE - sizeof(T)];
   };
     T lock;
     char padding[FOLLY_CACHE_LINE_SIZE - sizeof(T)];
   };
index 7915c96f24c61e3c5d36395f36fb77a73dafc046..049cf2ff9e2faabd70f8f0a84920d68a6031c75d 100644 (file)
@@ -32,7 +32,7 @@ namespace folly {
 
 class SocketAddress {
  public:
 
 class SocketAddress {
  public:
-  SocketAddress() {}
+  SocketAddress() = default;
 
   /**
    * Construct a SocketAddress from a hostname and port.
 
   /**
    * Construct a SocketAddress from a hostname and port.
index b1f6707f95891002e28e8714d04d6aa5df14a10b..b7c377e6cee87963b74811acaba0d677c08f72be 100644 (file)
@@ -208,7 +208,7 @@ class SubprocessError : public std::exception {};
 class CalledProcessError : public SubprocessError {
  public:
   explicit CalledProcessError(ProcessReturnCode rc);
 class CalledProcessError : public SubprocessError {
  public:
   explicit CalledProcessError(ProcessReturnCode rc);
-  ~CalledProcessError() throw() { }
+  ~CalledProcessError() throw() = default;
   const char* what() const throw() FOLLY_OVERRIDE { return what_.c_str(); }
   ProcessReturnCode returnCode() const { return returnCode_; }
  private:
   const char* what() const throw() FOLLY_OVERRIDE { return what_.c_str(); }
   ProcessReturnCode returnCode() const { return returnCode_; }
  private:
@@ -222,7 +222,7 @@ class CalledProcessError : public SubprocessError {
 class SubprocessSpawnError : public SubprocessError {
  public:
   SubprocessSpawnError(const char* executable, int errCode, int errnoValue);
 class SubprocessSpawnError : public SubprocessError {
  public:
   SubprocessSpawnError(const char* executable, int errCode, int errnoValue);
-  ~SubprocessSpawnError() throw() {}
+  ~SubprocessSpawnError() throw() = default;
   const char* what() const throw() FOLLY_OVERRIDE { return what_.c_str(); }
   int errnoValue() const { return errnoValue_; }
 
   const char* what() const throw() FOLLY_OVERRIDE { return what_.c_str(); }
   int errnoValue() const { return errnoValue_; }
 
index d3215f0db7835d3626020ee662c338baf303efc5..fee6fac4b0ce4e4524dafa20f3bcb58c34af7b30 100644 (file)
@@ -59,7 +59,7 @@ template<class T, class Tag> class ThreadLocalPtr;
 template<class T, class Tag=void>
 class ThreadLocal {
  public:
 template<class T, class Tag=void>
 class ThreadLocal {
  public:
-  ThreadLocal() { }
+  ThreadLocal() = default;
 
   T* get() const {
     T* ptr = tlp_.get();
 
   T* get() const {
     T* ptr = tlp_.get();
index abb57adc6cb31cbd59e90d15f2b3edff32d6abe1..26d1751658af5cb83981aab0292cc888531e7ad1 100644 (file)
@@ -52,7 +52,7 @@ TypeError::TypeError(const std::string& expected,
       '\''))
 {}
 
       '\''))
 {}
 
-TypeError::~TypeError() {}
+TypeError::~TypeError() = default;
 
 // This is a higher-order preprocessor macro to aid going from runtime
 // types to the compile time type system.
 
 // This is a higher-order preprocessor macro to aid going from runtime
 // types to the compile time type system.
index 51a6d20a0752d25139048074507b2c694a25ce0b..9283ee36d3ca79a789eda3281071adb62aaa035d 100644 (file)
@@ -59,7 +59,7 @@ Optional<SchemaError> makeError(Args&&... args) {
 struct ValidationContext;
 
 struct IValidator {
 struct ValidationContext;
 
 struct IValidator {
-  virtual ~IValidator() {}
+  virtual ~IValidator() = default;
 
  private:
   friend struct ValidationContext;
 
  private:
   friend struct ValidationContext;
@@ -102,7 +102,7 @@ struct SchemaValidatorContext final {
  * Root validator for a schema.
  */
 struct SchemaValidator final : IValidator, public Validator {
  * Root validator for a schema.
  */
 struct SchemaValidator final : IValidator, public Validator {
-  SchemaValidator() {}
+  SchemaValidator() = default;
   void loadSchema(SchemaValidatorContext& context, const dynamic& schema);
 
   Optional<SchemaError> validate(ValidationContext&,
   void loadSchema(SchemaValidatorContext& context, const dynamic& schema);
 
   Optional<SchemaError> validate(ValidationContext&,
@@ -1010,7 +1010,7 @@ folly::Singleton<Validator> schemaValidator([]() {
 });
 }
 
 });
 }
 
-Validator::~Validator() {}
+Validator::~Validator() = default;
 
 std::unique_ptr<Validator> makeValidator(const dynamic& schema) {
   auto v = make_unique<SchemaValidator>();
 
 std::unique_ptr<Validator> makeValidator(const dynamic& schema) {
   auto v = make_unique<SchemaValidator>();
index 395bc8232413a5e2db63eb73331559821d2349f1..28da8e96b21664609d8c97e4b527bda5973ab6a3 100644 (file)
@@ -59,7 +59,7 @@ public:
   typedef typename Base::size_type size_type;
   typedef typename Base::difference_type difference_type;
 
   typedef typename Base::size_type size_type;
   typedef typename Base::difference_type difference_type;
 
-  explicit StringKeyedUnorderedMap() {}
+  explicit StringKeyedUnorderedMap() = default;
 
   explicit StringKeyedUnorderedMap(
     size_type n,
 
   explicit StringKeyedUnorderedMap(
     size_type n,
index e66d231798f886d623323fca7fab7993bc1003af..43dde36def7369da4b72db9e5458502f8c44656a 100644 (file)
@@ -158,7 +158,7 @@ class RangeSource : public GenImpl<typename Range<Iterator>::reference,
                                    RangeSource<Iterator>> {
   Range<Iterator> range_;
  public:
                                    RangeSource<Iterator>> {
   Range<Iterator> range_;
  public:
-  RangeSource() {}
+  RangeSource() = default;
   explicit RangeSource(Range<Iterator> range)
     : range_(std::move(range))
   {}
   explicit RangeSource(Range<Iterator> range)
     : range_(std::move(range))
   {}
@@ -382,7 +382,7 @@ template<class Predicate>
 class Map : public Operator<Map<Predicate>> {
   Predicate pred_;
  public:
 class Map : public Operator<Map<Predicate>> {
   Predicate pred_;
  public:
-  Map() {}
+  Map() = default;
 
   explicit Map(Predicate pred)
     : pred_(std::move(pred))
 
   explicit Map(Predicate pred)
     : pred_(std::move(pred))
@@ -448,7 +448,7 @@ template<class Predicate>
 class Filter : public Operator<Filter<Predicate>> {
   Predicate pred_;
  public:
 class Filter : public Operator<Filter<Predicate>> {
   Predicate pred_;
  public:
-  Filter() {}
+  Filter() = default;
   explicit Filter(Predicate pred)
     : pred_(std::move(pred))
   { }
   explicit Filter(Predicate pred)
     : pred_(std::move(pred))
   { }
@@ -512,7 +512,7 @@ template<class Predicate>
 class Until : public Operator<Until<Predicate>> {
   Predicate pred_;
  public:
 class Until : public Operator<Until<Predicate>> {
   Predicate pred_;
  public:
-  Until() {}
+  Until() = default;
   explicit Until(Predicate pred)
     : pred_(std::move(pred))
   {}
   explicit Until(Predicate pred)
     : pred_(std::move(pred))
   {}
@@ -850,7 +850,7 @@ class Order : public Operator<Order<Selector, Comparer>> {
   Selector selector_;
   Comparer comparer_;
  public:
   Selector selector_;
   Comparer comparer_;
  public:
-  Order() {}
+  Order() = default;
 
   explicit Order(Selector selector)
     : selector_(std::move(selector))
 
   explicit Order(Selector selector)
     : selector_(std::move(selector))
@@ -984,7 +984,7 @@ template<class Selector>
 class Distinct : public Operator<Distinct<Selector>> {
   Selector selector_;
  public:
 class Distinct : public Operator<Distinct<Selector>> {
   Selector selector_;
  public:
-  Distinct() {}
+  Distinct() = default;
 
   explicit Distinct(Selector selector)
     : selector_(std::move(selector))
 
   explicit Distinct(Selector selector)
     : selector_(std::move(selector))
@@ -1165,7 +1165,7 @@ class FoldLeft : public Operator<FoldLeft<Seed, Fold>> {
   Seed seed_;
   Fold fold_;
  public:
   Seed seed_;
   Fold fold_;
  public:
-  FoldLeft() {}
+  FoldLeft() = default;
   FoldLeft(Seed seed,
            Fold fold)
     : seed_(std::move(seed))
   FoldLeft(Seed seed,
            Fold fold)
     : seed_(std::move(seed))
@@ -1193,7 +1193,7 @@ class FoldLeft : public Operator<FoldLeft<Seed, Fold>> {
  */
 class First : public Operator<First> {
  public:
  */
 class First : public Operator<First> {
  public:
-  First() { }
+  First() = default;
 
   template<class Source,
            class Value,
 
   template<class Source,
            class Value,
@@ -1226,7 +1226,7 @@ class First : public Operator<First> {
  */
 class Any : public Operator<Any> {
  public:
  */
 class Any : public Operator<Any> {
  public:
-  Any() { }
+  Any() = default;
 
   template<class Source,
            class Value>
 
   template<class Source,
            class Value>
@@ -1265,7 +1265,7 @@ template<class Predicate>
 class All : public Operator<All<Predicate>> {
   Predicate pred_;
  public:
 class All : public Operator<All<Predicate>> {
   Predicate pred_;
  public:
-  All() {}
+  All() = default;
   explicit All(Predicate pred)
     : pred_(std::move(pred))
   { }
   explicit All(Predicate pred)
     : pred_(std::move(pred))
   { }
@@ -1302,7 +1302,7 @@ template<class Reducer>
 class Reduce : public Operator<Reduce<Reducer>> {
   Reducer reducer_;
  public:
 class Reduce : public Operator<Reduce<Reducer>> {
   Reducer reducer_;
  public:
-  Reduce() {}
+  Reduce() = default;
   explicit Reduce(Reducer reducer)
     : reducer_(std::move(reducer))
   {}
   explicit Reduce(Reducer reducer)
     : reducer_(std::move(reducer))
   {}
@@ -1335,7 +1335,7 @@ class Reduce : public Operator<Reduce<Reducer>> {
  */
 class Count : public Operator<Count> {
  public:
  */
 class Count : public Operator<Count> {
  public:
-  Count() { }
+  Count() = default;
 
   template<class Source,
            class Value>
 
   template<class Source,
            class Value>
@@ -1418,7 +1418,7 @@ class Min : public Operator<Min<Selector, Comparer>> {
   Selector selector_;
   Comparer comparer_;
  public:
   Selector selector_;
   Comparer comparer_;
  public:
-  Min() {}
+  Min() = default;
 
   explicit Min(Selector selector)
     : selector_(std::move(selector))
 
   explicit Min(Selector selector)
     : selector_(std::move(selector))
@@ -1494,7 +1494,7 @@ class Append : public Operator<Append<Collection>> {
 template<class Collection>
 class Collect : public Operator<Collect<Collection>> {
  public:
 template<class Collection>
 class Collect : public Operator<Collect<Collection>> {
  public:
-  Collect() { }
+  Collect() = default;
 
   template<class Value,
            class Source,
 
   template<class Value,
            class Source,
@@ -1528,7 +1528,7 @@ template<template<class, class> class Container,
          template<class> class Allocator>
 class CollectTemplate : public Operator<CollectTemplate<Container, Allocator>> {
  public:
          template<class> class Allocator>
 class CollectTemplate : public Operator<CollectTemplate<Container, Allocator>> {
  public:
-  CollectTemplate() { }
+  CollectTemplate() = default;
 
   template<class Value,
            class Source,
 
   template<class Value,
            class Source,
@@ -1561,7 +1561,7 @@ class CollectTemplate : public Operator<CollectTemplate<Container, Allocator>> {
  */
 class Concat : public Operator<Concat> {
  public:
  */
 class Concat : public Operator<Concat> {
  public:
-  Concat() { }
+  Concat() = default;
 
   template<class Inner,
            class Source,
 
   template<class Inner,
            class Source,
@@ -1619,7 +1619,7 @@ class Concat : public Operator<Concat> {
  */
 class RangeConcat : public Operator<RangeConcat> {
  public:
  */
 class RangeConcat : public Operator<RangeConcat> {
  public:
-  RangeConcat() { }
+  RangeConcat() = default;
 
   template<class Range,
            class Source,
 
   template<class Range,
            class Source,
@@ -1824,7 +1824,7 @@ class Cycle : public Operator<Cycle> {
  */
 class Dereference : public Operator<Dereference> {
  public:
  */
 class Dereference : public Operator<Dereference> {
  public:
-  Dereference() {}
+  Dereference() = default;
 
   template<class Value,
            class Source,
 
   template<class Value,
            class Source,
@@ -1883,7 +1883,7 @@ class Dereference : public Operator<Dereference> {
  */
 class Indirect : public Operator<Indirect> {
  public:
  */
 class Indirect : public Operator<Indirect> {
  public:
-  Indirect() {}
+  Indirect() = default;
 
   template <class Value,
             class Source,
 
   template <class Value,
             class Source,
@@ -1997,11 +1997,11 @@ class VirtualGen : public GenImpl<Value, VirtualGen<Value>> {
  * non-template operators, statically defined to avoid the need for anything but
  * the header.
  */
  * non-template operators, statically defined to avoid the need for anything but
  * the header.
  */
-static const detail::Sum sum;
+static const detail::Sum sum{};
 
 
-static const detail::Count count;
+static const detail::Count count{};
 
 
-static const detail::First first;
+static const detail::First first{};
 
 /**
  * Use directly for detecting any values, or as a function to detect values
 
 /**
  * Use directly for detecting any values, or as a function to detect values
@@ -2010,21 +2010,21 @@ static const detail::First first;
  *  auto nonempty = g | any;
  *  auto evens = g | any(even);
  */
  *  auto nonempty = g | any;
  *  auto evens = g | any(even);
  */
-static const detail::Any any;
+static const detail::Any any{};
 
 
-static const detail::Min<Identity, Less> min;
+static const detail::Min<Identity, Less> min{};
 
 
-static const detail::Min<Identity, Greater> max;
+static const detail::Min<Identity, Greater> max{};
 
 
-static const detail::Order<Identity> order;
+static const detail::Order<Identity> order{};
 
 
-static const detail::Distinct<Identity> distinct;
+static const detail::Distinct<Identity> distinct{};
 
 
-static const detail::Map<Move> move;
+static const detail::Map<Move> move{};
 
 
-static const detail::Concat concat;
+static const detail::Concat concat{};
 
 
-static const detail::RangeConcat rconcat;
+static const detail::RangeConcat rconcat{};
 
 /**
  * Use directly for infinite sequences, or as a function to limit cycle count.
 
 /**
  * Use directly for infinite sequences, or as a function to limit cycle count.
@@ -2032,11 +2032,11 @@ static const detail::RangeConcat rconcat;
  *  auto forever = g | cycle;
  *  auto thrice = g | cycle(3);
  */
  *  auto forever = g | cycle;
  *  auto thrice = g | cycle(3);
  */
-static const detail::Cycle cycle;
+static const detail::Cycle cycle{};
 
 
-static const detail::Dereference dereference;
+static const detail::Dereference dereference{};
 
 
-static const detail::Indirect indirect;
+static const detail::Indirect indirect{};
 
 inline detail::Take take(size_t count) {
   return detail::Take(count);
 
 inline detail::Take take(size_t count) {
   return detail::Take(count);
index 06c8c208f7ec75237f35dee25a608092d226df85..b36c8c719efbbe2b07ab782550ab262f83f9a16b 100644 (file)
@@ -203,7 +203,7 @@ class MergeTuples {
 
 }  // namespace detail
 
 
 }  // namespace detail
 
-static const detail::Map<detail::MergeTuples> tuple_flatten;
+static const detail::Map<detail::MergeTuples> tuple_flatten{};
 
 // TODO(mcurtiss): support zip() for N>1 operands. Because of variadic problems,
 // this might not be easily possible until gcc4.8 is available.
 
 // TODO(mcurtiss): support zip() for N>1 operands. Because of variadic problems,
 // this might not be easily possible until gcc4.8 is available.
index 6916dca3c3b35f6282ad67b8e907af77da67de17..33aff6b44cbddb651a421c9477e308773d648370 100644 (file)
@@ -304,7 +304,7 @@ class Composed : public Operator<Composed<First, Second>> {
   First first_;
   Second second_;
  public:
   First first_;
   Second second_;
  public:
-  Composed() {}
+  Composed() = default;
 
   Composed(First first, Second second)
     : first_(std::move(first))
 
   Composed(First first, Second second)
     : first_(std::move(first))
index 50adb5bcb5944af84fe1b4e0da689953e08f5b1f..ca4a7179c7d535360198f80b4f67a0836086277a 100644 (file)
@@ -385,7 +385,7 @@ class ChunkedRangeSource
   Range<Iterator> range_;
 
  public:
   Range<Iterator> range_;
 
  public:
-  ChunkedRangeSource() {}
+  ChunkedRangeSource() = default;
   ChunkedRangeSource(int chunkSize, Range<Iterator> range)
       : chunkSize_(chunkSize), range_(std::move(range)) {}
 
   ChunkedRangeSource(int chunkSize, Range<Iterator> range)
       : chunkSize_(chunkSize), range_(std::move(range)) {}
 
index 08ca3f55c14842b36d59c013fd5df275ee591664..b40983924fa63c17ac1fa5222a0b0919a33dadb8 100644 (file)
@@ -45,7 +45,7 @@ class PMap : public Operator<PMap<Predicate>> {
   Predicate pred_;
   size_t nThreads_;
  public:
   Predicate pred_;
   size_t nThreads_;
  public:
-  PMap() {}
+  PMap() = default;
 
   PMap(Predicate pred, size_t nThreads)
     : pred_(std::move(pred)),
 
   PMap(Predicate pred, size_t nThreads)
     : pred_(std::move(pred)),
index 0cc0dc92322422cbdce8de0382e2bb52cbc65fff..8523bdb6a9d3ae893c62c8e26d50f93740a0a724 100644 (file)
@@ -83,7 +83,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
 
   class HandshakeCB {
    public:
 
   class HandshakeCB {
    public:
-    virtual ~HandshakeCB() {}
+    virtual ~HandshakeCB() = default;
 
     /**
      * handshakeVer() is invoked during handshaking to give the
 
     /**
      * handshakeVer() is invoked during handshaking to give the
index ff9562fe0c4b3302c58832bc0868a1a8d0f5fe3f..26662fc9c41122a7f13a025003c2e9c88ec1390c 100644 (file)
@@ -66,7 +66,7 @@ class AsyncServerSocket : public DelayedDestruction
 
   class AcceptCallback {
    public:
 
   class AcceptCallback {
    public:
-    virtual ~AcceptCallback() {}
+    virtual ~AcceptCallback() = default;
 
     /**
      * connectionAccepted() is called whenever a new client connection is
 
     /**
      * connectionAccepted() is called whenever a new client connection is
@@ -614,7 +614,7 @@ class AsyncServerSocket : public DelayedDestruction
     explicit RemoteAcceptor(AcceptCallback *callback)
       : callback_(callback) {}
 
     explicit RemoteAcceptor(AcceptCallback *callback)
       : callback_(callback) {}
 
-    ~RemoteAcceptor() {}
+    ~RemoteAcceptor() = default;
 
     void start(EventBase *eventBase, uint32_t maxAtOnce, uint32_t maxInQueue);
     void stop(EventBase* eventBase, AcceptCallback* callback);
 
     void start(EventBase *eventBase, uint32_t maxAtOnce, uint32_t maxInQueue);
     void stop(EventBase* eventBase, AcceptCallback* callback);
index 5436daa1af905e7b72240cd18f2c1b3ddb305536..3ff2b345eba1855ad30057100da9ded2f6be8e81 100644 (file)
@@ -148,7 +148,7 @@ class AsyncSocket::BytesWriteRequest : public AsyncSocket::WriteRequest {
   }
 
   // private destructor, to ensure callers use destroy()
   }
 
   // private destructor, to ensure callers use destroy()
-  virtual ~BytesWriteRequest() {}
+  virtual ~BytesWriteRequest() = default;
 
   const struct iovec* getOps() const {
     assert(opCount_ > opIndex_);
 
   const struct iovec* getOps() const {
     assert(opCount_ > opIndex_);
index 523093be675e931a5eb0c1e5fa10b2e3bec59e7c..5ea024ceaa660ab5136d9c811850c0b793fc8b8d 100644 (file)
@@ -67,7 +67,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper {
 
   class ConnectCallback {
    public:
 
   class ConnectCallback {
    public:
-    virtual ~ConnectCallback() {}
+    virtual ~ConnectCallback() = default;
 
     /**
      * connectSuccess() will be invoked when the connection has been
 
     /**
      * connectSuccess() will be invoked when the connection has been
index 1cf4d209d91eae5bc2cb17f1c41c15101ec617ac..a166db503d59ef63880d8708adb71a22e1a27139 100644 (file)
@@ -318,7 +318,7 @@ class AsyncTransport : public DelayedDestruction, public AsyncSocketBase {
   virtual size_t getRawBytesReceived() const = 0;
 
  protected:
   virtual size_t getRawBytesReceived() const = 0;
 
  protected:
-  virtual ~AsyncTransport() {}
+  virtual ~AsyncTransport() = default;
 };
 
 // Transitional intermediate interface. This is deprecated.
 };
 
 // Transitional intermediate interface. This is deprecated.
@@ -329,7 +329,7 @@ class AsyncTransportWrapper : virtual public AsyncTransport {
 
   class ReadCallback {
    public:
 
   class ReadCallback {
    public:
-    virtual ~ReadCallback() {}
+    virtual ~ReadCallback() = default;
 
     /**
      * When data becomes available, getReadBuffer() will be invoked to get the
 
     /**
      * When data becomes available, getReadBuffer() will be invoked to get the
@@ -400,7 +400,7 @@ class AsyncTransportWrapper : virtual public AsyncTransport {
 
   class WriteCallback {
    public:
 
   class WriteCallback {
    public:
-    virtual ~WriteCallback() {}
+    virtual ~WriteCallback() = default;
 
     /**
      * writeSuccess() will be invoked when all of the data has been
 
     /**
      * writeSuccess() will be invoked when all of the data has been
index 1a5201b9ac4103b78aa732dd90967d20ae5501a2..0476abe828dd1364cf34399a1072abd83f96b16e 100644 (file)
@@ -62,7 +62,7 @@ class AsyncUDPServerSocket : private AsyncUDPSocket::ReadCallback
       std::unique_ptr<folly::IOBuf> buf,
       bool truncated) noexcept = 0;
 
       std::unique_ptr<folly::IOBuf> buf,
       bool truncated) noexcept = 0;
 
-    virtual ~Callback() {}
+    virtual ~Callback() = default;
   };
 
   /**
   };
 
   /**
index 02f90080c5eefc5ea1596bc4d77f96df4667e15c..35d8373add6b7ac790cdd6574b83580711e355c4 100644 (file)
@@ -74,7 +74,7 @@ class AsyncUDPSocket : public EventHandler {
      */
     virtual void onReadClosed() noexcept = 0;
 
      */
     virtual void onReadClosed() noexcept = 0;
 
-    virtual ~ReadCallback() {}
+    virtual ~ReadCallback() = default;
   };
 
   /**
   };
 
   /**
index 639c8538f483ca5c66a1bb935cd388360887a0f0..bda26f7e325faa5e4026ad6d68f5895bb5eb39aa 100644 (file)
@@ -143,7 +143,7 @@ class DelayedDestruction : private boost::noncopyable {
    * shared_ptr using a DelayedDestruction::Destructor as the second argument
    * to the shared_ptr constructor.
    */
    * shared_ptr using a DelayedDestruction::Destructor as the second argument
    * to the shared_ptr constructor.
    */
-  virtual ~DelayedDestruction() {}
+  virtual ~DelayedDestruction() = default;
 
   /**
    * Get the number of DestructorGuards currently protecting this object.
 
   /**
    * Get the number of DestructorGuards currently protecting this object.
index 9077b06cd34e3c082d1293a4794a148724018b3c..369754bd8535e38b589a01b937a482f79467ff08 100644 (file)
@@ -46,7 +46,7 @@ class NotificationQueue;
 
 class EventBaseObserver {
  public:
 
 class EventBaseObserver {
  public:
-  virtual ~EventBaseObserver() {}
+  virtual ~EventBaseObserver() = default;
 
   virtual uint32_t getSampleRate() const = 0;
 
 
   virtual uint32_t getSampleRate() const = 0;
 
@@ -114,7 +114,7 @@ class EventBase : private boost::noncopyable,
    */
   class LoopCallback {
    public:
    */
   class LoopCallback {
    public:
-    virtual ~LoopCallback() {}
+    virtual ~LoopCallback() = default;
 
     virtual void runLoopCallback() noexcept = 0;
     void cancelLoopCallback() {
 
     virtual void runLoopCallback() noexcept = 0;
     void cancelLoopCallback() {
index 490c69b08a26c566a87f43175c7ccf8e0a84f9f3..a7c7bef9a3365710bc07c81d7e6dd51ed8b33f7a 100644 (file)
@@ -33,7 +33,7 @@ namespace folly {
 
 class RequestData {
  public:
 
 class RequestData {
  public:
-  virtual ~RequestData() {}
+  virtual ~RequestData() = default;
 };
 
 class RequestContext;
 };
 
 class RequestContext;
index 20df0c877944f425fac55a6e81fc46ae9ec7ea45..1b5592b8f1f76067a5e44d1b94c751870ee5f868 100644 (file)
@@ -42,7 +42,7 @@ namespace folly {
  */
 class PasswordCollector {
  public:
  */
 class PasswordCollector {
  public:
-  virtual ~PasswordCollector() {}
+  virtual ~PasswordCollector() = default;
   /**
    * Interface for customizing how to collect private key password.
    *
   /**
    * Interface for customizing how to collect private key password.
    *
index 2b35574ccfbfb8d6ed8f29c4a8491690b9e83cef..5c068db1678c03a9a63a456524eb09aea1ea3eb3 100644 (file)
@@ -41,7 +41,7 @@ class TimeoutManager {
     NORMAL
   };
 
     NORMAL
   };
 
-  virtual ~TimeoutManager() {}
+  virtual ~TimeoutManager() = default;
 
   /**
    * Attaches/detaches TimeoutManager to AsyncTimeout
 
   /**
    * Attaches/detaches TimeoutManager to AsyncTimeout
index 2f2d46cb5473caeb8702c721f7a1532910b97038..a4af2fc4ba8c76c7ab625b8d4fd001414b0ed3f6 100644 (file)
@@ -382,7 +382,7 @@ public:
   typedef std::reverse_iterator<iterator>       reverse_iterator;
   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
   typedef std::reverse_iterator<iterator>       reverse_iterator;
   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
-  explicit small_vector() {}
+  explicit small_vector() = default;
 
   small_vector(small_vector const& o) {
     auto n = o.size();
 
   small_vector(small_vector const& o) {
     auto n = o.size();
index 3aaba6471a35170360e072196913780a9e831e27..3d97be1b437a2583cd08eb9403f8cd2f82665bf6 100644 (file)
@@ -31,7 +31,7 @@ class IConnectionCounter {
    * Decrement the count of client-side connections.
    */
   virtual void onConnectionRemoved() = 0;
    * Decrement the count of client-side connections.
    */
   virtual void onConnectionRemoved() = 0;
-  virtual ~IConnectionCounter() {}
+  virtual ~IConnectionCounter() = default;
 };
 
 class SimpleConnectionCounter: public IConnectionCounter {
 };
 
 class SimpleConnectionCounter: public IConnectionCounter {
@@ -44,7 +44,7 @@ class SimpleConnectionCounter: public IConnectionCounter {
 
   void onConnectionAdded() override { numConnections_++; }
   void onConnectionRemoved() override { numConnections_--; }
 
   void onConnectionAdded() override { numConnections_++; }
   void onConnectionRemoved() override { numConnections_--; }
-  virtual ~SimpleConnectionCounter() {}
+  virtual ~SimpleConnectionCounter() = default;
 
  protected:
   uint64_t maxConnections_{0};
 
  protected:
   uint64_t maxConnections_{0};
index 45400a6aa68091d6822a586b92e78cdb648301b3..8a0327f72a0a866f0ae201c16bc45bbb5b822cc4 100644 (file)
@@ -40,7 +40,7 @@ class ConnectionManager: public folly::DelayedDestruction,
    */
   class Callback {
   public:
    */
   class Callback {
   public:
-    virtual ~Callback() {}
+    virtual ~Callback() = default;
 
     /**
      * Invoked when the number of connections managed by the
 
     /**
      * Invoked when the number of connections managed by the
@@ -189,7 +189,7 @@ class ConnectionManager: public folly::DelayedDestruction,
     DRAIN2 = 1,
   };
 
     DRAIN2 = 1,
   };
 
-  ~ConnectionManager() {}
+  ~ConnectionManager() = default;
 
   ConnectionManager(const ConnectionManager&) = delete;
   ConnectionManager& operator=(ConnectionManager&) = delete;
 
   ConnectionManager(const ConnectionManager&) = delete;
   ConnectionManager& operator=(ConnectionManager&) = delete;
index 57c51b97222e72911ba4355630558715fd594cd7..a3f1907f03f6850519752cc08581ce7390b7faa0 100644 (file)
@@ -39,9 +39,9 @@ class LoadShedConfiguration {
   typedef std::set<SocketAddress, AddressOnlyCompare> AddressSet;
   typedef std::set<NetworkAddress> NetworkSet;
 
   typedef std::set<SocketAddress, AddressOnlyCompare> AddressSet;
   typedef std::set<NetworkAddress> NetworkSet;
 
-  LoadShedConfiguration() {}
+  LoadShedConfiguration() = default;
 
 
-  ~LoadShedConfiguration() {}
+  ~LoadShedConfiguration() = default;
 
   void addWhitelistAddr(folly::StringPiece);
 
 
   void addWhitelistAddr(folly::StringPiece);
 
index abee324e5b323d33bb2b54de9f31755e27220824..7732b7b8c65a2493cc26c8a1259e57253c923d65 100644 (file)
@@ -38,7 +38,7 @@ class ManagedConnection:
 
   class Callback {
   public:
 
   class Callback {
   public:
-    virtual ~Callback() {}
+    virtual ~Callback() = default;
 
     /* Invoked when this connection becomes busy */
     virtual void onActivated(ManagedConnection& conn) = 0;
 
     /* Invoked when this connection becomes busy */
     virtual void onActivated(ManagedConnection& conn) = 0;
index ecd0c3b17bff4ef3b665f3782a5728abdb22eda5..d2f1a164773c825c7f902905c8b69e5324e0d4cf 100644 (file)
@@ -94,7 +94,7 @@ class ClientBootstrap {
     return pipeline_.get();
   }
 
     return pipeline_.get();
   }
 
-  virtual ~ClientBootstrap() {}
+  virtual ~ClientBootstrap() = default;
 
  protected:
   std::unique_ptr<Pipeline,
 
  protected:
   std::unique_ptr<Pipeline,
index 4b56de86628050ab775df870bc35c9018fa1bcbe..45eb8a032c4bbe7ba765082c8d9b3ded8eabe256 100644 (file)
@@ -40,7 +40,7 @@ class ServerAcceptor
       pipeline_->setPipelineManager(this);
     }
 
       pipeline_->setPipelineManager(this);
     }
 
-    ~ServerConnection() {}
+    ~ServerConnection() = default;
 
     void timeoutExpired() noexcept override {
     }
 
     void timeoutExpired() noexcept override {
     }
index 4940e67b504509b571c7e73e1c3cf5af0b76910a..3b7f6b0ada1198847b94ae12cca4884780eb16a3 100644 (file)
@@ -45,7 +45,7 @@ class ServerBootstrap {
   ServerBootstrap(const ServerBootstrap& that) = delete;
   ServerBootstrap(ServerBootstrap&& that) = default;
 
   ServerBootstrap(const ServerBootstrap& that) = delete;
   ServerBootstrap(ServerBootstrap&& that) = default;
 
-  ServerBootstrap() {}
+  ServerBootstrap() = default;
 
   ~ServerBootstrap() {
     stop();
 
   ~ServerBootstrap() {
     stop();
index 2080c2c224ddd00a4da33adbc753dfe7ace36fd0..4228ca4292cd4ab142fc30b96cdc8c2090b7a52e 100644 (file)
@@ -26,7 +26,7 @@ namespace folly { namespace wangle {
 template <class Context>
 class HandlerBase {
  public:
 template <class Context>
 class HandlerBase {
  public:
-  virtual ~HandlerBase() {}
+  virtual ~HandlerBase() = default;
 
   virtual void attachPipeline(Context* ctx) {}
   virtual void detachPipeline(Context* ctx) {}
 
   virtual void attachPipeline(Context* ctx) {}
   virtual void detachPipeline(Context* ctx) {}
@@ -55,7 +55,7 @@ class Handler : public HandlerBase<HandlerContext<Rout, Wout>> {
   typedef Win win;
   typedef Wout wout;
   typedef HandlerContext<Rout, Wout> Context;
   typedef Win win;
   typedef Wout wout;
   typedef HandlerContext<Rout, Wout> Context;
-  virtual ~Handler() {}
+  virtual ~Handler() = default;
 
   virtual void read(Context* ctx, Rin msg) = 0;
   virtual void readEOF(Context* ctx) {
 
   virtual void read(Context* ctx, Rin msg) = 0;
   virtual void readEOF(Context* ctx) {
@@ -112,7 +112,7 @@ class InboundHandler : public HandlerBase<InboundHandlerContext<Rout>> {
   typedef Nothing win;
   typedef Nothing wout;
   typedef InboundHandlerContext<Rout> Context;
   typedef Nothing win;
   typedef Nothing wout;
   typedef InboundHandlerContext<Rout> Context;
-  virtual ~InboundHandler() {}
+  virtual ~InboundHandler() = default;
 
   virtual void read(Context* ctx, Rin msg) = 0;
   virtual void readEOF(Context* ctx) {
 
   virtual void read(Context* ctx, Rin msg) = 0;
   virtual void readEOF(Context* ctx) {
@@ -139,7 +139,7 @@ class OutboundHandler : public HandlerBase<OutboundHandlerContext<Wout>> {
   typedef Win win;
   typedef Wout wout;
   typedef OutboundHandlerContext<Wout> Context;
   typedef Win win;
   typedef Wout wout;
   typedef OutboundHandlerContext<Wout> Context;
-  virtual ~OutboundHandler() {}
+  virtual ~OutboundHandler() = default;
 
   virtual Future<void> write(Context* ctx, Win msg) = 0;
   virtual Future<void> close(Context* ctx) {
 
   virtual Future<void> write(Context* ctx, Win msg) = 0;
   virtual Future<void> close(Context* ctx) {
index 9a220bcd3e8b8b847df4c9cf1f970418bd5311ec..5f12f99e8f2979af4109dd83a337767ad0759b86 100644 (file)
@@ -20,7 +20,7 @@ namespace folly { namespace wangle {
 
 class PipelineContext {
  public:
 
 class PipelineContext {
  public:
-  virtual ~PipelineContext() {}
+  virtual ~PipelineContext() = default;
 
   virtual void attachPipeline() = 0;
   virtual void detachPipeline() = 0;
 
   virtual void attachPipeline() = 0;
   virtual void detachPipeline() = 0;
@@ -41,7 +41,7 @@ class PipelineContext {
 template <class In>
 class InboundLink {
  public:
 template <class In>
 class InboundLink {
  public:
-  virtual ~InboundLink() {}
+  virtual ~InboundLink() = default;
   virtual void read(In msg) = 0;
   virtual void readEOF() = 0;
   virtual void readException(exception_wrapper e) = 0;
   virtual void read(In msg) = 0;
   virtual void readEOF() = 0;
   virtual void readException(exception_wrapper e) = 0;
@@ -52,7 +52,7 @@ class InboundLink {
 template <class Out>
 class OutboundLink {
  public:
 template <class Out>
 class OutboundLink {
  public:
-  virtual ~OutboundLink() {}
+  virtual ~OutboundLink() = default;
   virtual Future<void> write(Out msg) = 0;
   virtual Future<void> close() = 0;
 };
   virtual Future<void> write(Out msg) = 0;
   virtual Future<void> close() = 0;
 };
@@ -60,7 +60,7 @@ class OutboundLink {
 template <class P, class H, class Context>
 class ContextImplBase : public PipelineContext {
  public:
 template <class P, class H, class Context>
 class ContextImplBase : public PipelineContext {
  public:
-  ~ContextImplBase() {}
+  ~ContextImplBase() = default;
 
   H* getHandler() {
     return handler_.get();
 
   H* getHandler() {
     return handler_.get();
@@ -140,7 +140,7 @@ class ContextImpl
     this->impl_ = this;
   }
 
     this->impl_ = this;
   }
 
-  ~ContextImpl() {}
+  ~ContextImpl() = default;
 
   // HandlerContext overrides
   void fireRead(Rout msg) override {
 
   // HandlerContext overrides
   void fireRead(Rout msg) override {
@@ -289,7 +289,7 @@ class InboundContextImpl
     this->impl_ = this;
   }
 
     this->impl_ = this;
   }
 
-  ~InboundContextImpl() {}
+  ~InboundContextImpl() = default;
 
   // InboundHandlerContext overrides
   void fireRead(Rout msg) override {
 
   // InboundHandlerContext overrides
   void fireRead(Rout msg) override {
@@ -389,7 +389,7 @@ class OutboundContextImpl
     this->impl_ = this;
   }
 
     this->impl_ = this;
   }
 
-  ~OutboundContextImpl() {}
+  ~OutboundContextImpl() = default;
 
   // OutboundHandlerContext overrides
   Future<void> fireWrite(Wout msg) override {
 
   // OutboundHandlerContext overrides
   Future<void> fireWrite(Wout msg) override {
index ddd9a57654794f4efbe059baac665b6deeb5f499..69a37f4b250924a2b2f0e88fd1cc322b07e0522e 100644 (file)
@@ -27,7 +27,7 @@ class PipelineBase;
 template <class In, class Out>
 class HandlerContext {
  public:
 template <class In, class Out>
 class HandlerContext {
  public:
-  virtual ~HandlerContext() {}
+  virtual ~HandlerContext() = default;
 
   virtual void fireRead(In msg) = 0;
   virtual void fireReadEOF() = 0;
 
   virtual void fireRead(In msg) = 0;
   virtual void fireReadEOF() = 0;
@@ -65,7 +65,7 @@ class HandlerContext {
 template <class In>
 class InboundHandlerContext {
  public:
 template <class In>
 class InboundHandlerContext {
  public:
-  virtual ~InboundHandlerContext() {}
+  virtual ~InboundHandlerContext() = default;
 
   virtual void fireRead(In msg) = 0;
   virtual void fireReadEOF() = 0;
 
   virtual void fireRead(In msg) = 0;
   virtual void fireReadEOF() = 0;
@@ -86,7 +86,7 @@ class InboundHandlerContext {
 template <class Out>
 class OutboundHandlerContext {
  public:
 template <class Out>
 class OutboundHandlerContext {
  public:
-  virtual ~OutboundHandlerContext() {}
+  virtual ~OutboundHandlerContext() = default;
 
   virtual Future<void> fireWrite(Out msg) = 0;
   virtual Future<void> fireClose() = 0;
 
   virtual Future<void> fireWrite(Out msg) = 0;
   virtual Future<void> fireClose() = 0;
index 47c719ca763b1d8ee05c79c7ab0e273871c29ed5..174c5d9f1b7512bfd3d77a2b0d801de54410da12 100644 (file)
@@ -27,13 +27,13 @@ namespace folly { namespace wangle {
 
 class PipelineManager {
  public:
 
 class PipelineManager {
  public:
-  virtual ~PipelineManager() {}
+  virtual ~PipelineManager() = default;
   virtual void deletePipeline(PipelineBase* pipeline) = 0;
 };
 
 class PipelineBase : public DelayedDestruction {
  public:
   virtual void deletePipeline(PipelineBase* pipeline) = 0;
 };
 
 class PipelineBase : public DelayedDestruction {
  public:
-  virtual ~PipelineBase() {}
+  virtual ~PipelineBase() = default;
 
   void setPipelineManager(PipelineManager* manager) {
     manager_ = manager;
 
   void setPipelineManager(PipelineManager* manager) {
     manager_ = manager;
@@ -174,7 +174,7 @@ class PipelineFactory {
   virtual std::unique_ptr<Pipeline, folly::DelayedDestruction::Destructor>
   newPipeline(std::shared_ptr<AsyncSocket>) = 0;
 
   virtual std::unique_ptr<Pipeline, folly::DelayedDestruction::Destructor>
   newPipeline(std::shared_ptr<AsyncSocket>) = 0;
 
-  virtual ~PipelineFactory() {}
+  virtual ~PipelineFactory() = default;
 };
 
 }
 };
 
 }
index 72c7aa3566aa1a77dc564f2f913dc2a1aebc86c6..16677fa1ef139ea76b8bac444adc9658f9763b5e 100644 (file)
@@ -23,7 +23,7 @@ namespace folly { namespace wangle {
 template <class T>
 class BlockingQueue {
  public:
 template <class T>
 class BlockingQueue {
  public:
-  virtual ~BlockingQueue() {}
+  virtual ~BlockingQueue() = default;
   virtual void add(T item) = 0;
   virtual void addWithPriority(T item, int8_t priority) {
     add(std::move(item));
   virtual void add(T item) = 0;
   virtual void addWithPriority(T item, int8_t priority) {
     add(std::move(item));
index 08ed94da50c86039cc0533167f8e2ffd803885af..14d9a64549c9512c2b879956190e55a0fe4a692f 100644 (file)
@@ -40,7 +40,7 @@ namespace folly { namespace wangle {
 // IOThreadPoolExecutor will be created and returned.
 class IOExecutor : public virtual Executor {
  public:
 // IOThreadPoolExecutor will be created and returned.
 class IOExecutor : public virtual Executor {
  public:
-  virtual ~IOExecutor() {}
+  virtual ~IOExecutor() = default;
   virtual EventBase* getEventBase() = 0;
 };
 
   virtual EventBase* getEventBase() = 0;
 };
 
index effd7e0933d7e04e7a3492979b3d9e95404dc051..95446f1ba101f01324c72e634527324dcaab1842 100644 (file)
@@ -23,7 +23,7 @@ namespace folly { namespace wangle {
 
 class ThreadFactory {
  public:
 
 class ThreadFactory {
  public:
-  virtual ~ThreadFactory() {}
+  virtual ~ThreadFactory() = default;
   virtual std::thread newThread(Func&& func) = 0;
 };
 
   virtual std::thread newThread(Func&& func) = 0;
 };
 
index c8ca7bb13ce1cf74305e8accdb1d185f0381827d..bb77d39c3cddde0174a20f40b392234a5f6ebcac 100644 (file)
@@ -129,7 +129,7 @@ class ThreadPoolExecutor : public virtual Executor {
         idle(true),
         taskStatsSubject(pool->taskStatsSubject_) {}
 
         idle(true),
         taskStatsSubject(pool->taskStatsSubject_) {}
 
-    virtual ~Thread() {}
+    virtual ~Thread() = default;
 
     static std::atomic<uint64_t> nextId;
     uint64_t id;
 
     static std::atomic<uint64_t> nextId;
     uint64_t id;
index 8445ccf25e64cbb8e2445c98fb68775502872bb5..09af8c9dac03119240155331286e201e6e246957 100644 (file)
@@ -24,7 +24,7 @@ namespace folly { namespace wangle {
 template <class T>
 class Subscription {
  public:
 template <class T>
 class Subscription {
  public:
-  Subscription() {}
+  Subscription() = default;
 
   Subscription(const Subscription&) = delete;
 
 
   Subscription(const Subscription&) = delete;
 
index 7eb54241e098774368fd03e9abf618965b904b41..7874e19830bcd5c8092f6a59a462449a654a4ad2 100644 (file)
@@ -33,7 +33,7 @@ template <typename Req, typename Resp = Req>
 class Service {
  public:
   virtual Future<Resp> operator()(Req request) = 0;
 class Service {
  public:
   virtual Future<Resp> operator()(Req request) = 0;
-  virtual ~Service() {}
+  virtual ~Service() = default;
   virtual Future<void> close() {
     return makeFuture();
   }
   virtual Future<void> close() {
     return makeFuture();
   }
@@ -67,7 +67,7 @@ class ServiceFilter : public Service<ReqA, RespA> {
   public:
   explicit ServiceFilter(std::shared_ptr<Service<ReqB, RespB>> service)
       : service_(service) {}
   public:
   explicit ServiceFilter(std::shared_ptr<Service<ReqB, RespB>> service)
       : service_(service) {}
-  virtual ~ServiceFilter() {}
+  virtual ~ServiceFilter() = default;
 
   virtual Future<void> close() override {
     return service_->close();
 
   virtual Future<void> close() override {
     return service_->close();
@@ -132,7 +132,7 @@ class FactoryToService : public Service<Req, Resp> {
   explicit FactoryToService(
     std::shared_ptr<ServiceFactory<Pipeline, Req, Resp>> factory)
       : factory_(factory) {}
   explicit FactoryToService(
     std::shared_ptr<ServiceFactory<Pipeline, Req, Resp>> factory)
       : factory_(factory) {}
-  virtual ~FactoryToService() {}
+  virtual ~FactoryToService() = default;
 
   virtual Future<Resp> operator()(Req request) override {
     DCHECK(factory_);
 
   virtual Future<Resp> operator()(Req request) override {
     DCHECK(factory_);
index 8817b143b336750aac4eaaaf74205bae7a3c2a0b..e59b4c1a05ac873541db8f4cc622ac4e3d3c6bbe 100644 (file)
@@ -33,7 +33,7 @@ public:
       folly::DelayedDestruction::DestructorGuard> guard;
   } CacheContext;
 
       folly::DelayedDestruction::DestructorGuard> guard;
   } CacheContext;
 
-  virtual ~SSLCacheProvider() {}
+  virtual ~SSLCacheProvider() = default;
 
   /**
    * Store a session in the external cache.
 
   /**
    * Store a session in the external cache.
index 47aa3f111aff87966c19f510a1daa25d18d0c1db..6bd938b3d49ac8352c59b85720ec793602a2b040 100644 (file)
@@ -27,8 +27,8 @@
 namespace folly {
 
 struct SSLContextConfig {
 namespace folly {
 
 struct SSLContextConfig {
-  SSLContextConfig() {}
-  ~SSLContextConfig() {}
+  SSLContextConfig() = default;
+  ~SSLContextConfig() = default;
 
   struct CertificateInfo {
     CertificateInfo(const std::string& crtPath,
 
   struct CertificateInfo {
     CertificateInfo(const std::string& crtPath,
index 101dde79035231e08e94f1482f59eddd285f7035..095e13ca7ef06302c26682e085bbac67e32f44a8 100644 (file)
@@ -144,7 +144,7 @@ std::string flattenList(const std::list<std::string>& list) {
 
 }
 
 
 }
 
-SSLContextManager::~SSLContextManager() {}
+SSLContextManager::~SSLContextManager() = default;
 
 SSLContextManager::SSLContextManager(
   EventBase* eventBase,
 
 SSLContextManager::SSLContextManager(
   EventBase* eventBase,