Turi Create
4.0
is_memmovable.hpp
1
/* Copyright © 2017 Apple Inc. All rights reserved.
2
*
3
* Use of this source code is governed by a BSD-3-clause license that can
4
* be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5
*/
6
#ifndef TURI_GENERICS_IS_MEMMOVABLE_HPP
7
#define TURI_GENERICS_IS_MEMMOVABLE_HPP
8
#include <type_traits>
9
10
// Workaround for libstdc++ < 5.0
11
#if defined(__GLIBCXX__) && __GLIBCXX__ < 20150801
12
namespace
std
{
13
template
<
typename
T>
14
struct
is_trivially_copyable : integral_constant<bool, __has_trivial_copy(T)> {};
15
}
// namespace std
16
#endif // GLIBCXX macro
17
18
19
// Implementation of is_memmovable
20
namespace
turi
{
21
22
template
<
typename
T>
23
struct
is_memmovable {
24
static
constexpr
bool
value = std::is_trivially_copyable<T>::value;
25
};
26
};
27
28
#endif
std
STL namespace.
turi
SKD.
Definition:
capi_initialization.hpp:11
core
generics
is_memmovable.hpp
Generated by
1.8.13