//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___TYPE_TRAITS_IS_ALWAYS_BITCASTABLE_H #define _LIBCPP___TYPE_TRAITS_IS_ALWAYS_BITCASTABLE_H #include <__config> #include <__type_traits/integral_constant.h> #include <__type_traits/is_integral.h> #include <__type_traits/is_object.h> #include <__type_traits/is_same.h> #include <__type_traits/is_trivially_copyable.h> #include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD // Checks whether an object of type `From` can always be bit-cast to an object of type `To` and represent a valid value // of type `To`. In other words, `From` and `To` have the same value representation and the set of values of `From` is // a subset of the set of values of `To`. // // Note that types that cannot be assigned to each other using built-in assignment (e.g. arrays) might still be // considered bit-castable. template <class _From, class _To> struct __is_always_bitcastable { … }; _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_ALWAYS_BITCASTABLE_H