u5e
UnicodeTextC++Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
u5e
iterator_assertion.hpp
1
#
ifndef
INCLUDED_U5E_ITERATOR_ASSERTION
2
#
define
INCLUDED_U5E_ITERATOR_ASSERTION
3
4
#
include
<
iterator
>
5
6
namespace
u5e
{
7
/**
8
* \brief Asserts the iterator is consistently defined
9
*/
10
template
<
typename
WRAPPED,
typename
T>
11
class
iterator_assertion
{
12
typedef
typename
std::iterator_traits<WRAPPED>::value_type VT;
13
static_assert
(
sizeof
(VT)==
sizeof
(T),
14
"sizeof value_type incompatible with encoding"
);
15
static_assert
(
alignof
(VT)==
alignof
(T),
16
"alignof value_type incompatible with encoding"
);
17
static_assert
(std::is_integral<VT>::value,
18
"value_type is not an integral type"
);
19
};
20
};
21
22
#
endif
u5e
main u5e namespace
Definition:
basic_encodedstring.hpp:10
u5e::iterator_assertion
Asserts the iterator is consistently defined.
Definition:
iterator_assertion.hpp:11
Generated by
1.8.11