Skip to content

Commit 4f00ea9

Browse files
authored
Fixed the C++ overloads for intmax_t abs and div (#535)
1 parent 1096c42 commit 4f00ea9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libcxx/include/cinttypes

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ namespace std {
1212
using ::imaxdiv_t;
1313

1414
using ::imaxabs;
15-
inline constexpr intmax_t abs(intmax_t __x) { return imaxabs(__x); }
16-
1715
using ::imaxdiv;
16+
17+
#if __INTMAX_WIDTH__ > __LLONG_WIDTH__
18+
inline constexpr intmax_t abs(intmax_t __x) { return imaxabs(__x); }
1819
inline constexpr imaxdiv_t div(intmax_t __x, intmax_t __y) { return imaxdiv(__x, __y); }
20+
#endif // __INTMAX_WIDTH__ > __LLONG_WIDTH__
1921

2022
} // namespace std
2123

0 commit comments

Comments
 (0)