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/name.cpp b/src/name.cpp
index ba06322..acad1d1 100644
--- a/src/name.cpp
+++ b/src/name.cpp
@@ -27,11 +27,18 @@
#include "util/time.hpp"
#include "util/string-helper.hpp"
+#include "util/concepts.hpp"
#include "encoding/block.hpp"
#include "encoding/encoding-buffer.hpp"
namespace ndn {
+BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Name>));
+BOOST_CONCEPT_ASSERT((WireEncodable<Name>));
+BOOST_CONCEPT_ASSERT((WireDecodable<Name>));
+static_assert(std::is_base_of<tlv::Error, Name::Error>::value,
+ "Name::Error must inherit from tlv::Error");
+
template<bool T>
size_t
Name::wireEncode(EncodingImpl<T>& encoder) const