aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/bit
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-07-25 21:30:25 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-07-25 21:30:25 +0100
commit45c7215c1e17de75ea1abce59c3927f3f83d4b24 (patch)
treeffdde12a367ace330a205565310550bfe8e2ad23 /libstdc++-v3/include/std/bit
parent599780d601abd0e67814a07d9574cc00f227ea5e (diff)
downloadgcc-45c7215c1e17de75ea1abce59c3927f3f83d4b24.zip
gcc-45c7215c1e17de75ea1abce59c3927f3f83d4b24.tar.gz
gcc-45c7215c1e17de75ea1abce59c3927f3f83d4b24.tar.bz2
Relocate std::endian from <type_traits> to <bit>
This change to an early C++2a feature was just approved (P1612R1). * include/std/bit (endian): Move definition here as per P1612R1. * include/std/type_traits (endian): Remove definition from here. * testsuite/20_util/endian/1.cc: Rename to ... * testsuite/26_numerics/endian/1.cc: ... here. Adjust header. From-SVN: r273816
Diffstat (limited to 'libstdc++-v3/include/std/bit')
-rw-r--r--libstdc++-v3/include/std/bit7
1 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/bit b/libstdc++-v3/include/std/bit
index f17d2f1..d57433c 100644
--- a/libstdc++-v3/include/std/bit
+++ b/libstdc++-v3/include/std/bit
@@ -315,6 +315,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
log2p1(_Tp __x) noexcept
{ return std::__log2p1(__x); }
+ /// Byte order
+ enum class endian
+ {
+ little = __ORDER_LITTLE_ENDIAN__,
+ big = __ORDER_BIG_ENDIAN__,
+ native = __BYTE_ORDER__
+ };
#endif // C++2a
_GLIBCXX_END_NAMESPACE_VERSION