diff --git a/src/management/nfd-control-command.cpp b/src/management/nfd-control-command.cpp
index 307810d..88db4f9 100644
--- a/src/management/nfd-control-command.cpp
+++ b/src/management/nfd-control-command.cpp
@@ -31,6 +31,8 @@
 {
 }
 
+ControlCommand::~ControlCommand() = default;
+
 void
 ControlCommand::validateRequest(const ControlParameters& parameters) const
 {
diff --git a/src/management/nfd-control-command.hpp b/src/management/nfd-control-command.hpp
index 48a05ee..dfe876b 100644
--- a/src/management/nfd-control-command.hpp
+++ b/src/management/nfd-control-command.hpp
@@ -47,6 +47,9 @@
     }
   };
 
+  virtual
+  ~ControlCommand();
+
   /** \brief validate request parameters
    *  \throw ArgumentError if parameters are invalid
    */
@@ -142,12 +145,13 @@
   FaceCreateCommand();
 
   virtual void
-  applyDefaultsToRequest(ControlParameters& parameters) const;
+  applyDefaultsToRequest(ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
+
 /**
  * \ingroup management
  * \brief represents a faces/update command
@@ -159,12 +163,13 @@
   FaceUpdateCommand();
 
   virtual void
-  validateRequest(const ControlParameters& parameters) const;
+  validateRequest(const ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
+
 /**
  * \ingroup management
  * \brief represents a faces/destroy command
@@ -176,12 +181,13 @@
   FaceDestroyCommand();
 
   virtual void
-  validateRequest(const ControlParameters& parameters) const;
+  validateRequest(const ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
+
 /**
  * \ingroup management
  * \brief Base class for faces/[*]-local-control commands
@@ -190,10 +196,10 @@
 {
 public:
   virtual void
-  validateRequest(const ControlParameters& parameters) const;
+  validateRequest(const ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 
 protected:
   explicit
@@ -236,10 +242,10 @@
   FibAddNextHopCommand();
 
   virtual void
-  applyDefaultsToRequest(ControlParameters& parameters) const;
+  applyDefaultsToRequest(ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
 
@@ -254,10 +260,10 @@
   FibRemoveNextHopCommand();
 
   virtual void
-  applyDefaultsToRequest(ControlParameters& parameters) const;
+  applyDefaultsToRequest(ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
 
@@ -284,10 +290,10 @@
   StrategyChoiceUnsetCommand();
 
   virtual void
-  validateRequest(const ControlParameters& parameters) const;
+  validateRequest(const ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
 
@@ -302,10 +308,10 @@
   RibRegisterCommand();
 
   virtual void
-  applyDefaultsToRequest(ControlParameters& parameters) const;
+  applyDefaultsToRequest(ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
 
@@ -320,10 +326,10 @@
   RibUnregisterCommand();
 
   virtual void
-  applyDefaultsToRequest(ControlParameters& parameters) const;
+  applyDefaultsToRequest(ControlParameters& parameters) const override;
 
   virtual void
-  validateResponse(const ControlParameters& parameters) const;
+  validateResponse(const ControlParameters& parameters) const override;
 };
 
 } // namespace nfd
diff --git a/src/util/command-interest-validator.hpp b/src/util/command-interest-validator.hpp
index 689b450..b7c3494 100644
--- a/src/util/command-interest-validator.hpp
+++ b/src/util/command-interest-validator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -60,11 +60,6 @@
   {
   }
 
-  virtual
-  ~CommandInterestValidator()
-  {
-  }
-
   /**
    * @brief add an Interest rule that allows a specific certificate
    *
@@ -105,7 +100,7 @@
               int stepCount,
               const OnDataValidated& onValidated,
               const OnDataValidationFailed& onValidationFailed,
-              std::vector<shared_ptr<ValidationRequest> >& nextSteps)
+              std::vector<shared_ptr<ValidationRequest>>& nextSteps) override
   {
     onValidationFailed(data.shared_from_this(), "No policy for data checking");
   }
@@ -115,7 +110,8 @@
               int stepCount,
               const OnInterestValidated& onValidated,
               const OnInterestValidationFailed& onValidationFailed,
-              std::vector<shared_ptr<ValidationRequest> >& nextSteps);
+              std::vector<shared_ptr<ValidationRequest>>& nextSteps) override;
+
 private:
   time::milliseconds m_graceInterval; //ms
   std::map<Name, PublicKey> m_trustAnchorsForInterest;
@@ -163,7 +159,7 @@
                                       int stepCount,
                                       const OnInterestValidated& onValidated,
                                       const OnInterestValidationFailed& onValidationFailed,
-                                      std::vector<shared_ptr<ValidationRequest> >& nextSteps)
+                                      std::vector<shared_ptr<ValidationRequest>>& nextSteps)
 {
   const Name& interestName = interest.getName();
 
@@ -255,17 +251,17 @@
           timestampIt->second = interestTime;
         }
     }
-  catch (Signature::Error& e)
+  catch (const Signature::Error&)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "No valid signature");
     }
-  catch (IdentityCertificate::Error& e)
+  catch (const IdentityCertificate::Error&)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "Cannot locate the signing key");
     }
-  catch (tlv::Error& e)
+  catch (const tlv::Error&)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "Cannot decode signature related TLVs");
diff --git a/src/util/dummy-client-face.cpp b/src/util/dummy-client-face.cpp
index bdc8764..13327c6 100644
--- a/src/util/dummy-client-face.cpp
+++ b/src/util/dummy-client-face.cpp
@@ -35,37 +35,37 @@
 {
 public:
   void
-  receive(Block block)
+  receive(Block block) const
   {
     block.encode();
-    if (static_cast<bool>(m_receiveCallback)) {
+    if (m_receiveCallback) {
       m_receiveCallback(block);
     }
   }
 
   virtual void
-  close()
+  close() override
   {
   }
 
   virtual void
-  pause()
+  pause() override
   {
   }
 
   virtual void
-  resume()
+  resume() override
   {
   }
 
   virtual void
-  send(const Block& wire)
+  send(const Block& wire) override
   {
     onSendBlock(wire);
   }
 
   virtual void
-  send(const Block& header, const Block& payload)
+  send(const Block& header, const Block& payload) override
   {
     EncodingBuffer encoder(header.size() + payload.size(), header.size() + payload.size());
     encoder.appendByteArray(header.wire(), header.size());
diff --git a/src/util/face-uri.cpp b/src/util/face-uri.cpp
index f23ae8c..4ad9dba 100644
--- a/src/util/face-uri.cpp
+++ b/src/util/face-uri.cpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2015-2016, Regents of the University of California,
+ *                          Arizona Board of Regents,
+ *                          Colorado State University,
+ *                          University Pierre & Marie Curie, Sorbonne University,
+ *                          Washington University in St. Louis,
+ *                          Beijing Institute of Technology,
+ *                          The University of Memphis.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -212,9 +212,7 @@
 {
 public:
   virtual
-  ~CanonizeProvider()
-  {
-  }
+  ~CanonizeProvider() = default;
 
   virtual std::set<std::string>
   getSchemes() const = 0;
@@ -234,7 +232,7 @@
 {
 public:
   virtual std::set<std::string>
-  getSchemes() const
+  getSchemes() const override
   {
     std::set<std::string> schemes;
     schemes.insert(m_baseScheme);
@@ -244,7 +242,7 @@
   }
 
   virtual bool
-  isCanonical(const FaceUri& faceUri) const
+  isCanonical(const FaceUri& faceUri) const override
   {
     if (faceUri.getPort().empty()) {
       return false;
@@ -272,7 +270,7 @@
   canonize(const FaceUri& faceUri,
            const FaceUri::CanonizeSuccessCallback& onSuccess,
            const FaceUri::CanonizeFailureCallback& onFailure,
-           boost::asio::io_service& io, const time::nanoseconds& timeout) const
+           boost::asio::io_service& io, const time::nanoseconds& timeout) const override
   {
     if (this->isCanonical(faceUri)) {
       onSuccess(faceUri);
@@ -300,6 +298,7 @@
   }
 
 protected:
+  explicit
   IpHostCanonizeProvider(const std::string& baseScheme,
                          uint32_t defaultUnicastPort = 6363,
                          uint32_t defaultMulticastPort = 56363)
@@ -359,7 +358,7 @@
   virtual std::pair<bool, std::string>
   checkAddress(const dns::IpAddress& ipAddress) const
   {
-    return std::make_pair(true, "");
+    return {true, ""};
   }
 
 private:
@@ -387,7 +386,6 @@
 class TcpCanonizeProvider : public IpHostCanonizeProvider<boost::asio::ip::tcp>
 {
 public:
-public:
   TcpCanonizeProvider()
     : IpHostCanonizeProvider("tcp")
   {
@@ -395,12 +393,12 @@
 
 protected:
   virtual std::pair<bool, std::string>
-  checkAddress(const dns::IpAddress& ipAddress) const
+  checkAddress(const dns::IpAddress& ipAddress) const override
   {
     if (ipAddress.is_multicast()) {
-      return std::make_pair(false, "cannot use multicast address");
+      return {false, "cannot use multicast address"};
     }
-    return std::make_pair(true, "");
+    return {true, ""};
   }
 };
 
@@ -408,7 +406,7 @@
 {
 public:
   virtual std::set<std::string>
-  getSchemes() const
+  getSchemes() const override
   {
     std::set<std::string> schemes;
     schemes.insert("ether");
@@ -416,7 +414,7 @@
   }
 
   virtual bool
-  isCanonical(const FaceUri& faceUri) const
+  isCanonical(const FaceUri& faceUri) const override
   {
     if (!faceUri.getPort().empty()) {
       return false;
@@ -433,7 +431,7 @@
   canonize(const FaceUri& faceUri,
            const FaceUri::CanonizeSuccessCallback& onSuccess,
            const FaceUri::CanonizeFailureCallback& onFailure,
-           boost::asio::io_service& io, const time::nanoseconds& timeout) const
+           boost::asio::io_service& io, const time::nanoseconds& timeout) const override
   {
     ethernet::Address addr = ethernet::Address::fromString(faceUri.getHost());
     if (addr.isNull()) {
@@ -490,9 +488,9 @@
     BOOST_ASSERT(!providerTable.empty());
   }
 
-  CanonizeProviderTable::const_iterator it = providerTable.find(scheme);
+  auto it = providerTable.find(scheme);
   if (it == providerTable.end()) {
-    return 0;
+    return nullptr;
   }
   return it->second.get();
 }
@@ -514,30 +512,25 @@
   return cp->isCanonical(*this);
 }
 
-static inline void
-nop()
-{
-}
-
 void
 FaceUri::canonize(const CanonizeSuccessCallback& onSuccess,
                   const CanonizeFailureCallback& onFailure,
                   boost::asio::io_service& io, const time::nanoseconds& timeout) const
 {
   const CanonizeProvider* cp = getCanonizeProvider(this->getScheme());
-  if (cp == 0) {
-    if (static_cast<bool>(onFailure)) {
+  if (cp == nullptr) {
+    if (onFailure) {
       onFailure("scheme not supported");
     }
     return;
   }
 
-  static CanonizeSuccessCallback successNop = bind(&nop);
-  static CanonizeFailureCallback failureNop = bind(&nop);
+  static CanonizeSuccessCallback successNop = bind([]{});
+  static CanonizeFailureCallback failureNop = bind([]{});
 
   cp->canonize(*this,
-               static_cast<bool>(onSuccess) ? onSuccess : successNop,
-               static_cast<bool>(onFailure) ? onFailure : failureNop,
+               onSuccess ? onSuccess : successNop,
+               onFailure ? onFailure : failureNop,
                io, timeout);
 }
 
diff --git a/src/util/in-memory-storage-fifo.cpp b/src/util/in-memory-storage-fifo.cpp
index 5906d97..0899024 100644
--- a/src/util/in-memory-storage-fifo.cpp
+++ b/src/util/in-memory-storage-fifo.cpp
@@ -34,10 +34,6 @@
 {
 }
 
-InMemoryStorageFifo::~InMemoryStorageFifo()
-{
-}
-
 void
 InMemoryStorageFifo::afterInsert(InMemoryStorageEntry* entry)
 {
diff --git a/src/util/in-memory-storage-fifo.hpp b/src/util/in-memory-storage-fifo.hpp
index 4d522a4..3710284 100644
--- a/src/util/in-memory-storage-fifo.hpp
+++ b/src/util/in-memory-storage-fifo.hpp
@@ -43,26 +43,23 @@
   explicit
   InMemoryStorageFifo(boost::asio::io_service& ioService, size_t limit = 10);
 
-  virtual
-  ~InMemoryStorageFifo();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Removes one Data packet from in-memory storage based on FIFO
    *  @return{ whether the Data was removed }
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 
   /** @brief Update the entry after a entry is successfully inserted, add it to the cleanupIndex
    */
   virtual void
-  afterInsert(InMemoryStorageEntry* entry);
+  afterInsert(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry or other data structures before a entry is successfully erased,
    *  erase it from the cleanupIndex
    */
   virtual void
-  beforeErase(InMemoryStorageEntry* entry);
+  beforeErase(InMemoryStorageEntry* entry) override;
 
 private:
   //multi_index_container to implement FIFO
diff --git a/src/util/in-memory-storage-lfu.cpp b/src/util/in-memory-storage-lfu.cpp
index 0450c6c..0c08f1c 100644
--- a/src/util/in-memory-storage-lfu.cpp
+++ b/src/util/in-memory-storage-lfu.cpp
@@ -34,10 +34,6 @@
 {
 }
 
-InMemoryStorageLfu::~InMemoryStorageLfu()
-{
-}
-
 void
 InMemoryStorageLfu::afterInsert(InMemoryStorageEntry* entry)
 {
diff --git a/src/util/in-memory-storage-lfu.hpp b/src/util/in-memory-storage-lfu.hpp
index f02079e..d866a29 100644
--- a/src/util/in-memory-storage-lfu.hpp
+++ b/src/util/in-memory-storage-lfu.hpp
@@ -46,40 +46,37 @@
   explicit
   InMemoryStorageLfu(boost::asio::io_service& ioService, size_t limit = 10);
 
-  virtual
-  ~InMemoryStorageLfu();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Removes one Data packet from in-memory storage based on LFU, i.e. evict the least
    *  frequently accessed Data packet
    *  @return{ whether the Data was removed }
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 
   /** @brief Update the entry when the entry is returned by the find() function,
    *  increment the frequency according to LFU
    */
   virtual void
-  afterAccess(InMemoryStorageEntry* entry);
+  afterAccess(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry after a entry is successfully inserted, add it to the cleanupIndex
    */
   virtual void
-  afterInsert(InMemoryStorageEntry* entry);
+  afterInsert(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry or other data structures before a entry is successfully erased,
    *  erase it from the cleanupIndex
    */
   virtual void
-  beforeErase(InMemoryStorageEntry* entry);
+  beforeErase(InMemoryStorageEntry* entry) override;
 
 private:
-  //binds frequency and entry together
+  // binds frequency and entry together
   struct CleanupEntry
   {
     InMemoryStorageEntry* entry;
-    uint64_t frequency;//could potentially be overflowed
+    uint64_t frequency; // could potentially be overflowed
   };
 
   /** @brief Function to increment frequency of the entry in the CleanupEntry
diff --git a/src/util/in-memory-storage-lru.cpp b/src/util/in-memory-storage-lru.cpp
index 2a50644..01c8b12 100644
--- a/src/util/in-memory-storage-lru.cpp
+++ b/src/util/in-memory-storage-lru.cpp
@@ -35,10 +35,6 @@
 {
 }
 
-InMemoryStorageLru::~InMemoryStorageLru()
-{
-}
-
 void
 InMemoryStorageLru::afterInsert(InMemoryStorageEntry* entry)
 {
diff --git a/src/util/in-memory-storage-lru.hpp b/src/util/in-memory-storage-lru.hpp
index 8d7f852..4787398 100644
--- a/src/util/in-memory-storage-lru.hpp
+++ b/src/util/in-memory-storage-lru.hpp
@@ -44,33 +44,30 @@
 
   InMemoryStorageLru(boost::asio::io_service& ioService, size_t limit = 10);
 
-  virtual
-  ~InMemoryStorageLru();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Removes one Data packet from in-memory storage based on LRU, i.e. evict the least
    *  recently accessed Data packet
    *  @return{ whether the Data was removed }
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 
   /** @brief Update the entry when the entry is returned by the find() function,
    *  update the last used time according to LRU
    */
   virtual void
-  afterAccess(InMemoryStorageEntry* entry);
+  afterAccess(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry after a entry is successfully inserted, add it to the cleanupIndex
    */
   virtual void
-  afterInsert(InMemoryStorageEntry* entry);
+  afterInsert(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry or other data structures before a entry is successfully erased,
    *  erase it from the cleanupIndex
    */
   virtual void
-  beforeErase(InMemoryStorageEntry* entry);
+  beforeErase(InMemoryStorageEntry* entry) override;
 
 private:
   //multi_index_container to implement LRU
diff --git a/src/util/in-memory-storage-persistent.cpp b/src/util/in-memory-storage-persistent.cpp
index 613aa7b..954e9c1 100644
--- a/src/util/in-memory-storage-persistent.cpp
+++ b/src/util/in-memory-storage-persistent.cpp
@@ -34,10 +34,6 @@
 {
 }
 
-InMemoryStoragePersistent::~InMemoryStoragePersistent()
-{
-}
-
 bool
 InMemoryStoragePersistent::evictItem()
 {
diff --git a/src/util/in-memory-storage-persistent.hpp b/src/util/in-memory-storage-persistent.hpp
index 3cd12ef..3265f52 100644
--- a/src/util/in-memory-storage-persistent.hpp
+++ b/src/util/in-memory-storage-persistent.hpp
@@ -38,9 +38,6 @@
   explicit
   InMemoryStoragePersistent(boost::asio::io_service& ioService);
 
-  virtual
-  ~InMemoryStoragePersistent();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Do nothing.
    *
@@ -49,7 +46,7 @@
    *  @return false
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 };
 
 } // namespace util
diff --git a/src/util/indented-stream.hpp b/src/util/indented-stream.hpp
index 0ab76a2..31e5839 100644
--- a/src/util/indented-stream.hpp
+++ b/src/util/indented-stream.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -56,7 +56,8 @@
 public:
   IndentedStream(std::ostream& os, const std::string& indent);
 
-  ~IndentedStream();
+  virtual
+  ~IndentedStream() override;
 
 private:
   // Write a stream buffer that prefixes each line
@@ -66,7 +67,7 @@
     StreamBuf(std::ostream& os, const std::string& indent);
 
     virtual int
-    sync();
+    sync() override;
 
   private:
     std::ostream& m_output;
diff --git a/src/util/time-custom-clock.hpp b/src/util/time-custom-clock.hpp
index 066d3e9..57579e5 100644
--- a/src/util/time-custom-clock.hpp
+++ b/src/util/time-custom-clock.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -37,9 +37,8 @@
 class CustomClock
 {
 public:
-  virtual ~CustomClock()
-  {
-  }
+  virtual
+  ~CustomClock() = default;
 
   virtual typename BaseClock::time_point
   getNow() const = 0;
diff --git a/src/util/time-unit-test-clock.hpp b/src/util/time-unit-test-clock.hpp
index d1bbe7d..253e1e7 100644
--- a/src/util/time-unit-test-clock.hpp
+++ b/src/util/time-unit-test-clock.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -27,7 +27,6 @@
 namespace ndn {
 namespace time {
 
-
 /**
  * @brief Traits for UnitTestClock, defining default behavior for different clocks
  *
@@ -42,7 +41,7 @@
   getDefaultStartTime()
   {
     return nanoseconds::zero();
-  };
+  }
 };
 
 /**
@@ -59,7 +58,7 @@
   getDefaultStartTime()
   {
     return seconds(1415684132);
-  };
+  }
 };
 
 /**
@@ -75,8 +74,7 @@
 {
 public:
   explicit
-  UnitTestClock(const nanoseconds& startTime =
-                UnitTestClockTraits<BaseClock>::getDefaultStartTime());
+  UnitTestClock(const nanoseconds& startTime = UnitTestClockTraits<BaseClock>::getDefaultStartTime());
 
   /**
    * @brief Advance unit test clock by @p duration
@@ -91,15 +89,14 @@
   setNow(const nanoseconds& timeSinceEpoch);
 
 public: // CustomClock<BaseClock>
-
   virtual std::string
-  getSince() const;
+  getSince() const override;
 
   virtual typename BaseClock::time_point
-  getNow() const;
+  getNow() const override;
 
   virtual boost::posix_time::time_duration
-  toPosixDuration(const typename BaseClock::duration& duration) const;
+  toPosixDuration(const typename BaseClock::duration& duration) const override;
 
 private:
   nanoseconds m_currentTime;
