Skip to content

Commit 2eda509

Browse files
committed
Add stdfloat header
Fixes #1260
1 parent 098638c commit 2eda509

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

third_party/libcxx/BUILD.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,7 @@ third_party/libcxx/ryu/d2s_intrinsics.h \
10401040
third_party/libcxx/ryu/digit_table.h \
10411041
third_party/libcxx/ryu/f2s.h \
10421042
third_party/libcxx/ryu/ryu.h \
1043+
third_party/libcxx/stdfloat \
10431044

10441045
THIRD_PARTY_LIBCXX_A_SRCS = \
10451046
third_party/libcxx/algorithm.cpp \

third_party/libcxx/stdfloat

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// -*- C++ -*-
2+
3+
export namespace std {
4+
5+
#if defined(__STDCPP_FLOAT16_T__)
6+
using float16_t = _Float16;
7+
#endif
8+
9+
#if defined(__STDCPP_FLOAT32_T__)
10+
using float32_t = float;
11+
#endif
12+
13+
#if defined(__STDCPP_FLOAT64_T__)
14+
using float64_t = double;
15+
#endif
16+
17+
#if defined(__STDCPP_FLOAT128_T__)
18+
using float128_t = long double;
19+
#endif
20+
21+
#if defined(__STDCPP_BFLOAT16_T__)
22+
using bfloat16_t = __bf16;
23+
#endif
24+
25+
} // namespace std

0 commit comments

Comments
 (0)