ndn::tlv::detail Namespace Reference

Functions

template<typename Iterator >
constexpr bool readNumber (size_t size, Iterator &begin, Iterator end, uint64_t &number) noexcept
 

Variables

template<typename Iterator , typename DecayedIterator = std::decay_t<Iterator>, typename ValueType = typename std::iterator_traits<DecayedIterator>::value_type>
constexpr bool IsContiguousIterator
 Determine whether to select the readNumber() implementation for ContiguousIterator. More...
 

Function Documentation

◆ readNumber()

template<typename Iterator >
constexpr bool ndn::tlv::detail::readNumber ( size_t  size,
Iterator &  begin,
Iterator  end,
uint64_t &  number 
)
constexprnoexcept

Definition at line 295 of file tlv.hpp.

Variable Documentation

◆ IsContiguousIterator

template<typename Iterator , typename DecayedIterator = std::decay_t<Iterator>, typename ValueType = typename std::iterator_traits<DecayedIterator>::value_type>
constexpr bool ndn::tlv::detail::IsContiguousIterator
inlineconstexpr
Initial value:
=
(std::is_convertible_v<DecayedIterator, const ValueType*> ||
std::is_convertible_v<DecayedIterator, typename std::basic_string<ValueType>::const_iterator> ||
std::is_convertible_v<DecayedIterator, typename std::vector<ValueType>::const_iterator>) &&
sizeof(ValueType) == 1 && !std::is_same_v<ValueType, bool>

Determine whether to select the readNumber() implementation for ContiguousIterator.

This is not a full ContiguousIterator detection implementation. It returns true for the most common ContiguousIterator types used with TLV decoding function templates.

Definition at line 287 of file tlv.hpp.