This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 29.9.2 [filebuf], 126.96.36.199.2 [facet.num.put.virtuals] Status: CD1 Submitter: Daniel Krügler Opened: 2007-02-20 Last modified: 2016-02-10
Priority: Not Prioritized
View all issues with CD1 status.
The current standard 14882:2003(E) as well as N2134 have the following defects:
29.9.2 [filebuf]/5 says:
In order to support file I/O and multibyte/wide character conversion, conversions are performed using members of a facet, referred to as a_codecvt in following sections, obtained "as if" bycodecvt<charT,char,typename traits::state_type> a_codecvt = use_facet<codecvt<charT,char,typename traits::state_type> >(getloc());
use_facet returns a const facet reference and no facet is copyconstructible, so the codecvt construction should fail to compile.
A similar issue arises in 188.8.131.52.2 [facet.num.put.virtuals]/15 for num_punct.
In 29.9.2 [filebuf]/5 change the "as if" code
codecvt<charT,char,typename traits::state_type> a_codecvt = use_facet<codecvt<charT,char,typename traits::state_type> >(getloc());
In 184.108.40.206.2 [facet.num.put.virtuals]/15 (This is para 5 in N2134) change
A local variable punct is initialized vianumpunct<charT> punct = use_facet< numpunct<charT> >(str.getloc() )
(Please note also the additional provided trailing semicolon)