docs: update code-style rule 2.24
This commit also updates existing code to use the new format.
refs #4681
Change-Id: I88e62a34fc55a69cd01d74e80a7000c6cf4d7c2d
diff --git a/docs/code-style.rst b/docs/code-style.rst
index 0ae08fc..7071e1d 100644
--- a/docs/code-style.rst
+++ b/docs/code-style.rst
@@ -682,12 +682,16 @@
class Foo
{
+ public:
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
+ // You can inherit constructors from std::runtime_error like this:
+ using std::runtime_error::runtime_error;
+
+ // Additional constructors, if desired, can be declared like this:
+ Error(const std::string& what, const std::exception& inner)
+ : std::runtime_error(what + ": " + inner.what())
{
}
};
diff --git a/src/data.hpp b/src/data.hpp
index 56f98ed..9541d6b 100644
--- a/src/data.hpp
+++ b/src/data.hpp
@@ -38,11 +38,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
/** @brief Construct an unsigned Data packet with given @p name and empty Content.
diff --git a/src/delegation-list.cpp b/src/delegation-list.cpp
index 91ea7af..279e036 100644
--- a/src/delegation-list.cpp
+++ b/src/delegation-list.cpp
@@ -27,11 +27,6 @@
BOOST_CONCEPT_ASSERT((WireEncodableWithEncodingBuffer<DelegationList>));
BOOST_CONCEPT_ASSERT((WireDecodable<DelegationList>));
-DelegationList::Error::Error(const std::string& what)
- : tlv::Error(what)
-{
-}
-
DelegationList::Error::Error(const std::string& what, const std::exception& innerException)
: Error(what + ": "s + innerException.what())
{
diff --git a/src/delegation-list.hpp b/src/delegation-list.hpp
index a5cf58a..656a485 100644
--- a/src/delegation-list.hpp
+++ b/src/delegation-list.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -39,8 +39,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what);
+ using tlv::Error::Error;
Error(const std::string& what, const std::exception& innerException);
};
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 2aec91c..e25da9e 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -49,11 +49,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
public: // constructor, creation, assignment
diff --git a/src/encoding/tlv.hpp b/src/encoding/tlv.hpp
index 77d62f5..d4abdc1 100644
--- a/src/encoding/tlv.hpp
+++ b/src/encoding/tlv.hpp
@@ -52,11 +52,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/** @brief TLV-TYPE numbers defined in NDN Packet Format v0.3
diff --git a/src/exclude.hpp b/src/exclude.hpp
index 77c9785..6e720c8 100644
--- a/src/exclude.hpp
+++ b/src/exclude.hpp
@@ -46,11 +46,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
/**
diff --git a/src/face.hpp b/src/face.hpp
index 23634f1..4689b25 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (C) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -93,11 +93,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/src/interest-filter.hpp b/src/interest-filter.hpp
index f2a09c0..5eb088a 100644
--- a/src/interest-filter.hpp
+++ b/src/interest-filter.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -38,11 +38,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/src/interest.hpp b/src/interest.hpp
index 1357352..86c63a3 100644
--- a/src/interest.hpp
+++ b/src/interest.hpp
@@ -46,11 +46,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
/** @brief Construct an Interest with given @p name and @p lifetime.
diff --git a/src/key-locator.hpp b/src/key-locator.hpp
index 50e4b99..fcf3360 100644
--- a/src/key-locator.hpp
+++ b/src/key-locator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -33,11 +33,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
enum Type {
diff --git a/src/link.hpp b/src/link.hpp
index 6a46e02..b3e9bf2 100644
--- a/src/link.hpp
+++ b/src/link.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -35,11 +35,7 @@
class Error : public Data::Error
{
public:
- explicit
- Error(const std::string& what)
- : Data::Error(what)
- {
- }
+ using Data::Error::Error;
};
/** @brief Create an empty Link object
diff --git a/src/lp/cache-policy.hpp b/src/lp/cache-policy.hpp
index f35dc06..f772101 100644
--- a/src/lp/cache-policy.hpp
+++ b/src/lp/cache-policy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -50,11 +50,7 @@
class Error : public ndn::tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : ndn::tlv::Error(what)
- {
- }
+ using ndn::tlv::Error::Error;
};
CachePolicy();
diff --git a/src/lp/packet.hpp b/src/lp/packet.hpp
index 1aba8b1..872af58 100644
--- a/src/lp/packet.hpp
+++ b/src/lp/packet.hpp
@@ -33,11 +33,7 @@
class Error : public ndn::tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : ndn::tlv::Error(what)
- {
- }
+ using ndn::tlv::Error::Error;
};
Packet();
diff --git a/src/lp/prefix-announcement.hpp b/src/lp/prefix-announcement.hpp
index 135cc21..ef2b447 100644
--- a/src/lp/prefix-announcement.hpp
+++ b/src/lp/prefix-announcement.hpp
@@ -43,11 +43,7 @@
class Error : public ndn::tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : ndn::tlv::Error(what)
- {
- }
+ using ndn::tlv::Error::Error;
};
PrefixAnnouncement();
diff --git a/src/meta-info.hpp b/src/meta-info.hpp
index 3c3c59e..53ff8b9 100644
--- a/src/meta-info.hpp
+++ b/src/meta-info.hpp
@@ -61,11 +61,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
MetaInfo();
diff --git a/src/mgmt/control-response.hpp b/src/mgmt/control-response.hpp
index 266b21b..f37821f 100644
--- a/src/mgmt/control-response.hpp
+++ b/src/mgmt/control-response.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -35,11 +35,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
ControlResponse();
@@ -130,4 +126,4 @@
} // namespace mgmt
} // namespace ndn
-#endif // NDN_MGMT_CONTRO_RESPONSE_HPP
+#endif // NDN_MGMT_CONTROL_RESPONSE_HPP
diff --git a/src/mgmt/nfd/channel-status.hpp b/src/mgmt/nfd/channel-status.hpp
index 0345550..9aab7ae 100644
--- a/src/mgmt/nfd/channel-status.hpp
+++ b/src/mgmt/nfd/channel-status.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -38,11 +38,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
ChannelStatus();
diff --git a/src/mgmt/nfd/control-parameters.hpp b/src/mgmt/nfd/control-parameters.hpp
index 2291096..77ca076 100644
--- a/src/mgmt/nfd/control-parameters.hpp
+++ b/src/mgmt/nfd/control-parameters.hpp
@@ -84,11 +84,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
ControlParameters();
diff --git a/src/mgmt/nfd/cs-info.hpp b/src/mgmt/nfd/cs-info.hpp
index cdd38a9..99c77fc 100644
--- a/src/mgmt/nfd/cs-info.hpp
+++ b/src/mgmt/nfd/cs-info.hpp
@@ -40,11 +40,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
CsInfo();
diff --git a/src/mgmt/nfd/face-query-filter.hpp b/src/mgmt/nfd/face-query-filter.hpp
index 4b35293..96bd7b7 100644
--- a/src/mgmt/nfd/face-query-filter.hpp
+++ b/src/mgmt/nfd/face-query-filter.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -39,11 +39,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
FaceQueryFilter();
diff --git a/src/mgmt/nfd/face-traits.hpp b/src/mgmt/nfd/face-traits.hpp
index 58a9245..dda9038 100644
--- a/src/mgmt/nfd/face-traits.hpp
+++ b/src/mgmt/nfd/face-traits.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,11 +40,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
uint64_t
diff --git a/src/mgmt/nfd/fib-entry.hpp b/src/mgmt/nfd/fib-entry.hpp
index d91f651..b68e21f 100644
--- a/src/mgmt/nfd/fib-entry.hpp
+++ b/src/mgmt/nfd/fib-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -37,11 +37,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
NextHopRecord();
diff --git a/src/mgmt/nfd/forwarder-status.hpp b/src/mgmt/nfd/forwarder-status.hpp
index 33dd40a..f222f80 100644
--- a/src/mgmt/nfd/forwarder-status.hpp
+++ b/src/mgmt/nfd/forwarder-status.hpp
@@ -39,11 +39,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
ForwarderStatus();
diff --git a/src/mgmt/nfd/rib-entry.hpp b/src/mgmt/nfd/rib-entry.hpp
index 1ea73d3..a04ffa1 100644
--- a/src/mgmt/nfd/rib-entry.hpp
+++ b/src/mgmt/nfd/rib-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -45,11 +45,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
Route();
diff --git a/src/mgmt/nfd/status-dataset.hpp b/src/mgmt/nfd/status-dataset.hpp
index f7f7917..c86155f 100644
--- a/src/mgmt/nfd/status-dataset.hpp
+++ b/src/mgmt/nfd/status-dataset.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -75,11 +75,7 @@
class ParseResultError : public tlv::Error
{
public:
- explicit
- ParseResultError(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
#ifdef DOXYGEN
diff --git a/src/mgmt/nfd/strategy-choice.hpp b/src/mgmt/nfd/strategy-choice.hpp
index 55871bb..d76d278 100644
--- a/src/mgmt/nfd/strategy-choice.hpp
+++ b/src/mgmt/nfd/strategy-choice.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -39,11 +39,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
StrategyChoice();
diff --git a/src/name-component.hpp b/src/name-component.hpp
index cf39e58..9f8de4f 100644
--- a/src/name-component.hpp
+++ b/src/name-component.hpp
@@ -53,11 +53,7 @@
class Error : public Block::Error
{
public:
- explicit
- Error(const std::string& what)
- : Block::Error(what)
- {
- }
+ using Block::Error::Error;
};
public: // constructors
diff --git a/src/name.hpp b/src/name.hpp
index 2fd48a0..ad986d7 100644
--- a/src/name.hpp
+++ b/src/name.hpp
@@ -42,15 +42,7 @@
class Name
{
public: // nested types
- class Error : public name::Component::Error
- {
- public:
- explicit
- Error(const std::string& what)
- : name::Component::Error(what)
- {
- }
- };
+ using Error = name::Component::Error;
using Component = name::Component;
using component_container = std::vector<Component>;
diff --git a/src/net/dns.hpp b/src/net/dns.hpp
index 961e5bd..9357613 100644
--- a/src/net/dns.hpp
+++ b/src/net/dns.hpp
@@ -60,13 +60,10 @@
}
};
-struct Error : public std::runtime_error
+class Error : public std::runtime_error
{
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+public:
+ using std::runtime_error::runtime_error;
};
typedef function<void (const IpAddress& address)> SuccessCallback;
diff --git a/src/net/network-monitor.hpp b/src/net/network-monitor.hpp
index 2441e3e..afafd58 100644
--- a/src/net/network-monitor.hpp
+++ b/src/net/network-monitor.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -53,11 +53,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/src/security/key-params.hpp b/src/security/key-params.hpp
index dce4908..9b344cb 100644
--- a/src/security/key-params.hpp
+++ b/src/security/key-params.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -38,11 +38,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
virtual
diff --git a/src/security/pib/pib-impl.hpp b/src/security/pib/pib-impl.hpp
index dc384a8..ba72466 100644
--- a/src/security/pib/pib-impl.hpp
+++ b/src/security/pib/pib-impl.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -23,9 +23,10 @@
#define NDN_SECURITY_PIB_PIB_IMPL_HPP
#include "pib.hpp"
-#include <set>
#include "../v2/certificate.hpp"
+#include <set>
+
namespace ndn {
namespace security {
namespace pib {
@@ -48,11 +49,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
public:
diff --git a/src/security/pib/pib-memory.hpp b/src/security/pib/pib-memory.hpp
index 1252909..5331c7f 100644
--- a/src/security/pib/pib-memory.hpp
+++ b/src/security/pib/pib-memory.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -37,17 +37,6 @@
class PibMemory : public PibImpl
{
public:
- class Error : public PibImpl::Error
- {
- public:
- explicit
- Error(const std::string& what)
- : PibImpl::Error(what)
- {
- }
- };
-
-public:
/**
* @brief Create memory based PIB backend
* @param location Not used (required by the PIB-registration interface)
diff --git a/src/security/pib/pib.hpp b/src/security/pib/pib.hpp
index 27d83da..3be9870 100644
--- a/src/security/pib/pib.hpp
+++ b/src/security/pib/pib.hpp
@@ -56,11 +56,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
public:
diff --git a/src/security/signing-info.hpp b/src/security/signing-info.hpp
index 6e8bca4..4856a49 100644
--- a/src/security/signing-info.hpp
+++ b/src/security/signing-info.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -43,11 +43,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
enum SignerType {
diff --git a/src/security/tpm/back-end-file.hpp b/src/security/tpm/back-end-file.hpp
index bd2838d..cc0db78 100644
--- a/src/security/tpm/back-end-file.hpp
+++ b/src/security/tpm/back-end-file.hpp
@@ -42,17 +42,6 @@
class BackEndFile : public BackEnd
{
public:
- class Error : public BackEnd::Error
- {
- public:
- explicit
- Error(const std::string& what)
- : BackEnd::Error(what)
- {
- }
- };
-
-public:
/**
* @brief Create file-based TPM backend
* @param location Directory to store private keys
diff --git a/src/security/tpm/back-end-mem.hpp b/src/security/tpm/back-end-mem.hpp
index 469b466..5a40de4 100644
--- a/src/security/tpm/back-end-mem.hpp
+++ b/src/security/tpm/back-end-mem.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -34,17 +34,6 @@
class BackEndMem : public BackEnd
{
public:
- class Error : public BackEnd::Error
- {
- public:
- explicit
- Error(const std::string& what)
- : BackEnd::Error(what)
- {
- }
- };
-
-public:
/**
* @brief Create memory-based TPM backend
* @param location Not used (required by the TPM-registration interface)
diff --git a/src/security/tpm/back-end-osx.hpp b/src/security/tpm/back-end-osx.hpp
index 61f7f68..bb018be 100644
--- a/src/security/tpm/back-end-osx.hpp
+++ b/src/security/tpm/back-end-osx.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -39,17 +39,6 @@
class BackEndOsx : public BackEnd
{
public:
- class Error : public BackEnd::Error
- {
- public:
- explicit
- Error(const std::string& what)
- : BackEnd::Error(what)
- {
- }
- };
-
-public:
/**
* @brief Create TPM backed based on macOS KeyChain service
* @param location Not used (required by the TPM-registration interface)
diff --git a/src/security/tpm/back-end.hpp b/src/security/tpm/back-end.hpp
index 4c55ab2..2f9e389 100644
--- a/src/security/tpm/back-end.hpp
+++ b/src/security/tpm/back-end.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -44,11 +44,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
public:
diff --git a/src/security/tpm/key-handle.hpp b/src/security/tpm/key-handle.hpp
index d6faf4d..3d55ca3 100644
--- a/src/security/tpm/key-handle.hpp
+++ b/src/security/tpm/key-handle.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -41,11 +41,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
public:
diff --git a/src/security/tpm/tpm.hpp b/src/security/tpm/tpm.hpp
index 367a6b9..620a2cc 100644
--- a/src/security/tpm/tpm.hpp
+++ b/src/security/tpm/tpm.hpp
@@ -66,11 +66,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
public:
diff --git a/src/security/transform/private-key.hpp b/src/security/transform/private-key.hpp
index 17d582b..fb4978a 100644
--- a/src/security/transform/private-key.hpp
+++ b/src/security/transform/private-key.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -41,11 +41,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/src/security/transform/public-key.hpp b/src/security/transform/public-key.hpp
index a94814d..41aeacb 100644
--- a/src/security/transform/public-key.hpp
+++ b/src/security/transform/public-key.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -38,11 +38,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
public:
diff --git a/src/security/v2/additional-description.hpp b/src/security/v2/additional-description.hpp
index 5e16132..16281f9 100644
--- a/src/security/v2/additional-description.hpp
+++ b/src/security/v2/additional-description.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -41,11 +41,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
typedef std::map<std::string, std::string>::iterator iterator;
diff --git a/src/security/v2/key-chain.hpp b/src/security/v2/key-chain.hpp
index b5219da..c4cbef4 100644
--- a/src/security/v2/key-chain.hpp
+++ b/src/security/v2/key-chain.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -49,11 +49,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/src/security/v2/trust-anchor-container.hpp b/src/security/v2/trust-anchor-container.hpp
index f935571..16151e9 100644
--- a/src/security/v2/trust-anchor-container.hpp
+++ b/src/security/v2/trust-anchor-container.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -58,11 +58,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/src/security/validity-period.hpp b/src/security/validity-period.hpp
index e87c6ec..ee7c602 100644
--- a/src/security/validity-period.hpp
+++ b/src/security/validity-period.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,11 +40,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
public:
diff --git a/src/selectors.hpp b/src/selectors.hpp
index d25c980..e3cb6e4 100644
--- a/src/selectors.hpp
+++ b/src/selectors.hpp
@@ -39,11 +39,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
Selectors();
diff --git a/src/signature-info.hpp b/src/signature-info.hpp
index af6908d..1a6eeb7 100644
--- a/src/signature-info.hpp
+++ b/src/signature-info.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -36,11 +36,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
/** @brief Create an invalid SignatureInfo
diff --git a/src/signature.hpp b/src/signature.hpp
index 1af7885..1c051c8 100644
--- a/src/signature.hpp
+++ b/src/signature.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,11 +40,7 @@
class Error : public tlv::Error
{
public:
- explicit
- Error(const std::string& what)
- : tlv::Error(what)
- {
- }
+ using tlv::Error::Error;
};
Signature() = default;
diff --git a/src/util/config-file.hpp b/src/util/config-file.hpp
index 2bb6c2d..65e4e7d 100644
--- a/src/util/config-file.hpp
+++ b/src/util/config-file.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -52,11 +52,7 @@
class Error : public std::runtime_error
{
public:
- Error(const std::string& what)
- : std::runtime_error(what)
- {
-
- }
+ using std::runtime_error::runtime_error;
};
typedef boost::property_tree::ptree Parsed;
diff --git a/src/util/io.hpp b/src/util/io.hpp
index 5a8034a..5d457fc 100644
--- a/src/util/io.hpp
+++ b/src/util/io.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -33,11 +33,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/** \brief indicates how a file or stream is encoded
diff --git a/src/util/regex/regex-matcher.hpp b/src/util/regex/regex-matcher.hpp
index bb18a8f..74ef1ce 100644
--- a/src/util/regex/regex-matcher.hpp
+++ b/src/util/regex/regex-matcher.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -35,11 +35,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
enum RegexExprType {
diff --git a/src/util/sha256.hpp b/src/util/sha256.hpp
index d729e90..7df5ead 100644
--- a/src/util/sha256.hpp
+++ b/src/util/sha256.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -47,11 +47,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**