stdfloat 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // <stdfloat> -*- C++ -*-
  2. // Copyright (C) 2022-2023 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file include/stdfloat
  21. * This is a Standard C++ Library header.
  22. */
  23. #ifndef _GLIBCXX_STDFLOAT
  24. #define _GLIBCXX_STDFLOAT 1
  25. #if __cplusplus > 202002L
  26. #include <bits/c++config.h>
  27. namespace std
  28. {
  29. _GLIBCXX_BEGIN_NAMESPACE_VERSION
  30. #ifdef __STDCPP_FLOAT16_T__
  31. using float16_t = _Float16;
  32. #endif
  33. #ifdef __STDCPP_FLOAT32_T__
  34. using float32_t = _Float32;
  35. #endif
  36. #ifdef __STDCPP_FLOAT64_T__
  37. using float64_t = _Float64;
  38. #endif
  39. #ifdef __STDCPP_FLOAT128_T__
  40. using float128_t = _Float128;
  41. #endif
  42. #ifdef __STDCPP_BFLOAT16_T__
  43. using bfloat16_t = __gnu_cxx::__bfloat16_t;
  44. #endif
  45. _GLIBCXX_END_NAMESPACE_VERSION
  46. } // namespace std
  47. #endif // C++23
  48. #endif // _GLIBCXX_STDFLOAT