[libcxx-commits] [PATCH] D100005: [libc++] Use the default initializer for char_type in std::num_get::do_get.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 21 14:38:04 PDT 2023
ldionne added inline comments.
================
Comment at: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/user_defined_char_type.pass.cpp:80
+ static locale::id id;
+ Char toupper(Char c) const { return Char(std::toupper(c.underlying_)); }
+ const char* widen(const char* first, const char* last, Char* dst) const {
----------------
bcain wrote:
> I'm investigating a failure that occurs when on this test case in our downstream. I'm not quite certain but it's possible the ambiguity is due to the fact that we are using a 32-bit architecture?
>
> ```
> libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/user_defined_char_type.pass.cpp:80:39: error: ambiguous conversion for functional-style cast from 'int' to 'Char'
> 80 | Char toupper(Char c) const { return Char(std::toupper(c.underlying_)); }
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ```
Yes, that could be. I guess
```
Char(unsigned i) : underlying_(i) {}
explicit Char(std::int32_t i) : underlying_(i) {}
```
must be ambiguous somehow? Can you open a PR that fixes your problem? (kinda hard without being able to reproduce locally)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100005/new/
https://reviews.llvm.org/D100005
More information about the libcxx-commits
mailing list