// Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // class locale wide member functions #include #include _STD_BEGIN #pragma warning(disable : 4074) #pragma init_seg(compiler) // facets associated with C categories #define ADDFAC(Facet, cat, ptrimp, ptrloc) \ if ((_CATMASK(Facet::_Getcat()) & cat) == 0) { \ ; \ } else if (ptrloc == nullptr) { \ ptrimp->_Addfac(new Facet(lobj), Facet::id._Get_index()); \ } else { \ ptrimp->_Addfac( \ const_cast(static_cast(&_STD use_facet(*ptrloc))), \ Facet::id._Get_index()); \ } // moved from locale to ease subsetting using _Tw1 = ctype; using _Tw2 = num_get; using _Tw3 = num_put; using _Tw4 = numpunct; using _Tw5 = collate; using _Tw6 = messages; using _Tw7 = money_get; using _Tw8 = money_put; using _Tw9 = moneypunct; using _Tw10 = moneypunct; using _Tw11 = time_get; using _Tw12 = time_put; using _Tw13 = codecvt; __PURE_APPDOMAIN_GLOBAL locale::id time_put::id{}; void __CLRCALL_OR_CDECL locale::_Locimp::_Makewloc(const _Locinfo& lobj, locale::category cat, _Locimp* ptrimp, const locale* ptrloc) { // setup wide part of a new locale ADDFAC(_Tw1, cat, ptrimp, ptrloc); ADDFAC(_Tw2, cat, ptrimp, ptrloc); ADDFAC(_Tw3, cat, ptrimp, ptrloc); ADDFAC(_Tw4, cat, ptrimp, ptrloc); ADDFAC(_Tw5, cat, ptrimp, ptrloc); ADDFAC(_Tw6, cat, ptrimp, ptrloc); ADDFAC(_Tw7, cat, ptrimp, ptrloc); ADDFAC(_Tw8, cat, ptrimp, ptrloc); ADDFAC(_Tw9, cat, ptrimp, ptrloc); ADDFAC(_Tw10, cat, ptrimp, ptrloc); ADDFAC(_Tw11, cat, ptrimp, ptrloc); ADDFAC(_Tw12, cat, ptrimp, ptrloc); ADDFAC(_Tw13, cat, ptrimp, ptrloc); } // moved from locale to ease subsetting using _Tu1 = ctype; using _Tu2 = num_get; using _Tu3 = num_put; using _Tu4 = numpunct; using _Tu5 = collate; using _Tu6 = messages; using _Tu7 = money_get; using _Tu8 = money_put; using _Tu9 = moneypunct; using _Tu10 = moneypunct; using _Tu11 = time_get; using _Tu12 = time_put; using _Tu13 = codecvt; void __CLRCALL_OR_CDECL locale::_Locimp::_Makeushloc(const _Locinfo& lobj, locale::category cat, _Locimp* ptrimp, const locale* ptrloc) { // setup wide part of a new locale ADDFAC(_Tu1, cat, ptrimp, ptrloc); ADDFAC(_Tu2, cat, ptrimp, ptrloc); ADDFAC(_Tu3, cat, ptrimp, ptrloc); ADDFAC(_Tu4, cat, ptrimp, ptrloc); ADDFAC(_Tu5, cat, ptrimp, ptrloc); ADDFAC(_Tu6, cat, ptrimp, ptrloc); ADDFAC(_Tu7, cat, ptrimp, ptrloc); ADDFAC(_Tu8, cat, ptrimp, ptrloc); ADDFAC(_Tu9, cat, ptrimp, ptrloc); ADDFAC(_Tu10, cat, ptrimp, ptrloc); ADDFAC(_Tu11, cat, ptrimp, ptrloc); ADDFAC(_Tu12, cat, ptrimp, ptrloc); ADDFAC(_Tu13, cat, ptrimp, ptrloc); } _STD_END