Lines Matching refs:TYPE

40 template <typename TYPE>
44 is_pointer = trait_pointer<TYPE>::value,
46 has_trivial_ctor = is_pointer || trait_trivial_ctor<TYPE>::value,
48 has_trivial_dtor = is_pointer || trait_trivial_dtor<TYPE>::value,
50 has_trivial_copy = is_pointer || trait_trivial_copy<TYPE>::value,
52 has_trivial_move = is_pointer || trait_trivial_move<TYPE>::value
117 template<typename TYPE> inline
118 int strictly_order_type(const TYPE& lhs, const TYPE& rhs) {
122 template<typename TYPE> inline
123 int compare_type(const TYPE& lhs, const TYPE& rhs) {
131 template<typename TYPE> inline
132 void construct_type(TYPE* p, size_t n) {
133 if (!traits<TYPE>::has_trivial_ctor) {
135 new(p++) TYPE;
140 template<typename TYPE> inline
141 void destroy_type(TYPE* p, size_t n) {
142 if (!traits<TYPE>::has_trivial_dtor) {
144 p->~TYPE();
150 template<typename TYPE> inline
151 void copy_type(TYPE* d, const TYPE* s, size_t n) {
152 if (!traits<TYPE>::has_trivial_copy) {
154 new(d) TYPE(*s);
158 memcpy(d,s,n*sizeof(TYPE));
162 template<typename TYPE> inline
163 void splat_type(TYPE* where, const TYPE* what, size_t n) {
164 if (!traits<TYPE>::has_trivial_copy) {
166 new(where) TYPE(*what);
176 template<typename TYPE> inline
177 void move_forward_type(TYPE* d, const TYPE* s, size_t n = 1) {
178 if ((traits<TYPE>::has_trivial_dtor && traits<TYPE>::has_trivial_copy)
179 || traits<TYPE>::has_trivial_move)
181 memmove(d,s,n*sizeof(TYPE));
187 if (!traits<TYPE>::has_trivial_copy) {
188 new(d) TYPE(*s);
192 if (!traits<TYPE>::has_trivial_dtor) {
193 s->~TYPE();
199 template<typename TYPE> inline
200 void move_backward_type(TYPE* d, const TYPE* s, size_t n = 1) {
201 if ((traits<TYPE>::has_trivial_dtor && traits<TYPE>::has_trivial_copy)
202 || traits<TYPE>::has_trivial_move)
204 memmove(d,s,n*sizeof(TYPE));
207 if (!traits<TYPE>::has_trivial_copy) {
208 new(d) TYPE(*s);
212 if (!traits<TYPE>::has_trivial_dtor) {
213 s->~TYPE();