Home | History | Annotate | Download | only in tinyutils

Lines Matching refs:TYPE

44 template <typename TYPE>
47 is_pointer = trait_pointer<TYPE>::value,
48 has_trivial_ctor = is_pointer || trait_trivial_ctor<TYPE>::value,
49 has_trivial_dtor = is_pointer || trait_trivial_dtor<TYPE>::value,
50 has_trivial_copy = is_pointer || trait_trivial_copy<TYPE>::value,
51 has_trivial_assign = is_pointer || trait_trivial_assign<TYPE>::value
94 template<typename TYPE> inline
95 int strictly_order_type(const TYPE& lhs, const TYPE& rhs) {
99 template<typename TYPE> inline
100 int compare_type(const TYPE& lhs, const TYPE& rhs) {
108 template<typename TYPE> inline
109 void construct_type(TYPE* p, size_t n) {
110 if (!traits<TYPE>::has_trivial_ctor) {
112 new(p++) TYPE;
117 template<typename TYPE> inline
118 void destroy_type(TYPE* p, size_t n) {
119 if (!traits<TYPE>::has_trivial_dtor) {
121 p->~TYPE();
127 template<typename TYPE> inline
128 void copy_type(TYPE* d, const TYPE* s, size_t n) {
129 if (!traits<TYPE>::has_trivial_copy) {
131 new(d) TYPE(*s);
135 memcpy(d,s,n*sizeof(TYPE));
139 template<typename TYPE> inline
140 void assign_type(TYPE* d, const TYPE* s, size_t n) {
141 if (!traits<TYPE>::has_trivial_assign) {
146 memcpy(d,s,n*sizeof(TYPE));
150 template<typename TYPE> inline
151 void splat_type(TYPE* where, const TYPE* what, size_t n) {
152 if (!traits<TYPE>::has_trivial_copy) {
154 new(where) TYPE(*what);
164 template<typename TYPE> inline
165 void move_forward_type(TYPE* d, const TYPE* s, size_t n = 1) {
166 if (!traits<TYPE>::has_trivial_copy || !traits<TYPE>::has_trivial_dtor) {
171 if (!traits<TYPE>::has_trivial_copy) {
172 new(d) TYPE(*s);
176 if (!traits<TYPE>::has_trivial_dtor) {
177 s->~TYPE();
181 memmove(d,s,n*sizeof(TYPE));
185 template<typename TYPE> inline
186 void move_backward_type(TYPE* d, const TYPE* s, size_t n = 1) {
187 if (!traits<TYPE>::has_trivial_copy || !traits<TYPE>::has_trivial_dtor) {
189 if (!traits<TYPE>::has_trivial_copy) {
190 new(d) TYPE(*s);
194 if (!traits<TYPE>::has_trivial_dtor) {
195 s->~TYPE();
200 memmove(d,s,n*sizeof(TYPE));