… | |
… | |
65 | // "not simple enough" will use the slow path. |
65 | // "not simple enough" will use the slow path. |
66 | static bool is_simple_enough () |
66 | static bool is_simple_enough () |
67 | { |
67 | { |
68 | #if ECB_CPP11 |
68 | #if ECB_CPP11 |
69 | return std::is_trivially_assignable<T, T>::value |
69 | return std::is_trivially_assignable<T, T>::value |
70 | && std::is_trivially_constructable<T>::value |
70 | && std::is_trivially_constructible<T>::value |
71 | && std::is_trivially_copyable<T>::value |
71 | && std::is_trivially_copyable<T>::value |
72 | && std::is_trivially_destructible<T>::value; |
72 | && std::is_trivially_destructible<T>::value; |
73 | #elif ECB_GCC_VERSION(4,4) |
73 | #elif ECB_GCC_VERSION(4,4) || ECB_CLANG_VERSION(2,8) |
74 | return __has_trivial_assign (T) |
74 | return __has_trivial_assign (T) |
75 | && __has_trivial_constructor (T) |
75 | && __has_trivial_constructor (T) |
76 | && __has_trivial_copy (T) |
76 | && __has_trivial_copy (T) |
77 | && __has_trivial_destructor (T); |
77 | && __has_trivial_destructor (T); |
78 | #else |
78 | #else |