[libcxx-commits] [libcxx] [libc++] Speed up classic locale (PR #72112)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 15 10:34:17 PST 2023
================
@@ -154,12 +155,16 @@ class _LIBCPP_HIDDEN locale::__imp
{return static_cast<size_t>(id) < facets_.size() && facets_[static_cast<size_t>(id)];}
const locale::facet* use_facet(long id) const;
+ void acquire();
+ void release();
+
static const locale& make_classic();
static locale& make_global();
private:
void install(facet* f, long id);
template <class F> void install(F* f) {install(f, f->id.__get());}
template <class F> void install_from(const __imp& other);
+ static std::atomic<__imp*> classic_;
----------------
mordante wrote:
Please add documentation for this variable. The patch has a nice description, but when looking at this code in the future it's not easily visible.
https://github.com/llvm/llvm-project/pull/72112
More information about the libcxx-commits
mailing list