1 // Compatibility symbols for alternate 128-bit long-double format -*- C++ -*-
3 // Copyright (C) 2018-2023 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 #define _GLIBCXX_USE_CXX11_ABI 1
28 #ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
30 #if !defined(_GLIBCXX_USE_DUAL_ABI)
31 #error "compatibility-ldbl-alt128-cxx11.cc must only be compiled when dual ABI is enabled"
34 #if ! defined __LONG_DOUBLE_IBM128__ && ! defined __LONG_DOUBLE_IEEE128__
35 #error "compatibility-ldbl-alt128.cc must only be compiled for 128-bit long double"
40 #include "locale-inst-monetary.h"
42 #ifdef _GLIBCXX_USE_WCHAR_T
46 # include "locale-inst-monetary.h"
50 namespace std
_GLIBCXX_VISIBILITY(default)
52 _GLIBCXX_BEGIN_NAMESPACE_VERSION
56 alignas(money_get
<char>) char money_get_c
[sizeof(money_get
<char>)];
57 alignas(money_put
<char>) char money_put_c
[sizeof(money_put
<char>)];
58 #ifdef _GLIBCXX_USE_WCHAR_T
59 alignas(money_get
<wchar_t>) char money_get_w
[sizeof(money_get
<wchar_t>)];
60 alignas(money_put
<wchar_t>) char money_put_w
[sizeof(money_put
<wchar_t>)];
63 template<typename Facet
>
65 init_facet(function
<void(const locale::id
*, const locale::facet
*)>& func
,
68 func(&Facet::id
, facet
);
73 template class function
<void(const locale::id
*, const locale::facet
*)>;
76 __locale_Impl_init_extra_ldbl128(
77 function
<void(const locale::id
*, const locale::facet
*)> f
,
82 init_facet(f
, new (&money_get_c
) money_get
<char>(1));
83 init_facet(f
, new (&money_put_c
) money_put
<char>(1));
84 #ifdef _GLIBCXX_USE_WCHAR_T
85 init_facet(f
, new (&money_get_w
) money_get
<wchar_t>(1));
86 init_facet(f
, new (&money_put_w
) money_put
<wchar_t>(1));
91 init_facet(f
, new money_get
<char>);
92 init_facet(f
, new money_put
<char>);
93 #ifdef _GLIBCXX_USE_WCHAR_T
94 init_facet(f
, new money_get
<wchar_t>);
95 init_facet(f
, new money_put
<wchar_t>);
100 _GLIBCXX_END_NAMESPACE_VERSION