base: ensure Element::Error inherits from tlv::Error
Adding static asserts to ensure (Name|name::Component|Interest|
Selectors|Exclude|KeyLocator|Data|MetaInfo|Signature|SignatureInfo)
::Error are subclasses of tlv::Error.
This commit also adds WireEncodable and WireDecodable concept checks
to Name,name::Component,Interest,Selectors,Exclude,KeyLocator,Data,
MetaInfo,SignatureInfo types.
This commit also moves definition of Selectors method into .cpp.
refs #1983
Change-Id: I15220b93437d4a624ae09df66defc91ceac2386c
diff --git a/src/signature-info.cpp b/src/signature-info.cpp
index 1e40b1f..13e5be3 100644
--- a/src/signature-info.cpp
+++ b/src/signature-info.cpp
@@ -21,11 +21,18 @@
#include "signature-info.hpp"
#include "encoding/block-helpers.hpp"
+#include "util/concepts.hpp"
#include <boost/lexical_cast.hpp>
namespace ndn {
+BOOST_CONCEPT_ASSERT((boost::EqualityComparable<SignatureInfo>));
+BOOST_CONCEPT_ASSERT((WireEncodable<SignatureInfo>));
+BOOST_CONCEPT_ASSERT((WireDecodable<SignatureInfo>));
+static_assert(std::is_base_of<tlv::Error, SignatureInfo::Error>::value,
+ "SignatureInfo::Error must inherit from tlv::Error");
+
SignatureInfo::SignatureInfo()
: m_type(-1)
, m_hasKeyLocator(false)