[libcxx-commits] [libcxx] [libc++] Fix incomplete user-defined ctype specialization in test (PR #74630)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 7 06:20:25 PST 2023
================
@@ -73,15 +71,53 @@ struct char_traits<Char> {
static int_type eof() { return char_traits<char>::eof(); }
};
+// This ctype specialization treats all characters as spaces
template <>
-class ctype<Char> : public locale::facet {
+class ctype<Char> : public locale::facet, public ctype_base {
----------------
ldionne wrote:
Yeah I noticed that you folks had `locale::facet` deriving from `ctype_base` (or the other way around) when I tested this on Godbolt. I think it makes it impossible for users to implement a specialization of `ctype` in a conforming way, but I understand this is not really something you can fix.
I'd be OK with an `#ifdef` for this case.
https://github.com/llvm/llvm-project/pull/74630
More information about the libcxx-commits
mailing list