-// Copyright (C) 2014-2016 Free Software Foundation, Inc.
+// Copyright (C) 2014-2022 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-namespace
+namespace
{
typedef char fake_collate_c[sizeof(std::collate<char>)]
__attribute__ ((aligned(__alignof__(std::collate<char>))));
typedef char fake_money_get_c[sizeof(money_get<char>)]
__attribute__ ((aligned(__alignof__(money_get<char>))));
fake_money_get_c money_get_c;
-
+
typedef char fake_money_put_c[sizeof(money_put<char>)]
__attribute__ ((aligned(__alignof__(money_put<char>))));
fake_money_put_c money_put_c;
typedef char fake_money_get_w[sizeof(money_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(money_get<wchar_t>))));
fake_money_get_w money_get_w;
-
+
typedef char fake_money_put_w[sizeof(money_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(money_put<wchar_t>))));
fake_money_put_w money_put_w;
_M_init_facet_unchecked(new (&messages_w) std::messages<wchar_t>(1));
#endif
+ // The caches must be populated last, after creating all facets.
_M_caches[numpunct<char>::id._M_id()] = __npc;
_M_caches[moneypunct<char, false>::id._M_id()] = __mpcf;
_M_caches[moneypunct<char, true>::id._M_id()] = __mpct;
_M_init_facet_unchecked(new money_put<wchar_t>);
_M_init_facet_unchecked(new time_get<wchar_t>);
_M_init_facet_unchecked(new std::messages<wchar_t>(__cloc, __s));
-#endif
+#endif
}
// TODO should be in another file
__ret.reserve(128);
__ret += _S_categories[0];
__ret += '=';
- __ret += _M_impl->_M_names[0];
+ __ret += _M_impl->_M_names[0];
for (size_t __i = 1; __i < _S_categories_size; ++__i)
{
__ret += ';';