1 #ifndef BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE16_HPP
2 #define BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE16_HPP
17 #include <boost/archive/iterators/binary_from_base64.hpp>
30 template<
class CharType>
34 const signed char lookup_table[] = {
35 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
36 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
37 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
38 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1,
39 -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,
40 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
41 -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
43 BOOST_STATIC_ASSERT(0x70 ==
sizeof(lookup_table));
44 signed char value = -1;
45 if((
unsigned)t <
sizeof(lookup_table))
46 value = lookup_table[(unsigned)t];
49 "attempt to decode a value not in base16 char set");
72 class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type
76 detail::to_4_bit<CharType>,
81 typedef transform_iterator<
90 Base(static_cast<T>(start)),
91 detail::to_4_bit<CharType>()
97 Base(rhs.base_reference()),
98 detail::to_4_bit<CharType>()
108 #endif // BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE16_HPP
friend class boost::iterator_core_access
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
CharType operator()(CharType t) const
binary_from_base16(T start)
binary_from_base16(const binary_from_base16 &rhs)