Task #1983
Updated by Junxiao Shi about 11 years ago
Most decoding procedure assumes that *Element*`::Error` inherits from `tlv::Error`.
Such decoding procedure looks like:
try {
interest.wireDecode(block);
}
catch (tlv::Error&) {
// handle error
}
This Task is to add BOOST\_STATIC\_ASSERT to each TLV elememt abstraction type, so that *Element*`::Error` is guaranteed to inherit from `tlv::Error`.
One such assert looks like:
BOOST_STATIC_ASSERT((std::is_base_of<tlv::Error, BOOST_STATIC_ASSERT((boost::is_base_of<tlv::Error, Exclude::Error>::value));
This line should appear in .cpp for the implementation (not in .hpp or unit testing).