This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/78702] [libstdc++] class __shim in locale::facet is private
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2016 17:50:39 +0000
- Subject: [Bug libstdc++/78702] [libstdc++] class __shim in locale::facet is private
- Auto-submitted: auto-generated
- References: <bug-78702-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78702
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to AK from comment #0)
> In file: include/bits/locale_classes.h
> 371 class locale::facet
> 372 {
> ...
> 465 class __shim;
> 466
> 467 const facet* _M_sso_shim(const id*) const;
> 468 const facet* _M_cow_shim(const id*) const;
>
> However in file: src/c++11/cxx11-shim_facets.cc
> numpunct_shim derives from facet::__shim which results in compilation error.
No it doesn't.
If you're using some non-default options or a non-GCC compiler to build
libstdc++ then it would be helpful to say so. Because that file builds fine
(probably due to one of GCC's bugs related to access checking in templates).
> 227 namespace // unnamed
> 228 {
> 229 template<typename _CharT>
> 230 struct numpunct_shim : std::numpunct<_CharT>, facet::__shim
> 231 {
> 232 typedef typename numpunct<_CharT>::__cache_type __cache_type;
> 233
> 234 // f must point to a type derived from numpunct<C>[abi:other]
> 235 numpunct_shim(const facet* f, __cache_type* c = new __cache_type)
> 236 : std::numpunct<_CharT>(c), __shim(f), _M_cache(c)
> 237 {
> 238 __numpunct_fill_cache(other_abi{}, f, c);
> 239 }
>
>
> What could be a possible fix here?
We can build that file with -fno-access-control if needed.