Index: libcxx/src/locale.cpp =================================================================== --- libcxx/src/locale.cpp +++ libcxx/src/locale.cpp @@ -897,6 +897,8 @@ locale::id ctype::id; +const size_t ctype::table_size; + ctype::ctype(const mask* tab, bool del, size_t refs) : locale::facet(refs), __tab_(tab), Index: libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template <> class ctype + +#include +#include + +#include "test_macros.h" + +int main(int, char**) { + typedef std::ctype F; + const size_t* G = &F::table_size; + assert(*G >= 256); + + return 0; +}