[LWG #454] basic_filebuf::open should accept wchar_t names
----------------------------------------------------------

                 Key: STDCXX-930
                 URL: https://issues.apache.org/jira/browse/STDCXX-930
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 27. Input/Output
    Affects Versions: 4.2.1
            Reporter: Martin Sebor
            Priority: Minor
             Fix For: 4.3


LWG issue 
[454|http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2577.html#454] 
proposes to change [filebuf.members] from:

{quote}
{noformat}
    basic_filebuf<charT,traits>* open(const char* s, ios_base::openmode mode);
{noformat}

    ??Effects??: If {{is_open() != false}}, returns a null pointer. Otherwise, 
initializes the {{filebuf}} as required. It then opens a file, if possible, 
whose name is the NTBS ??s?? ("as if" by calling {{std::fopen(??s??, 
??modstr??)}}).
{quote}

to:

{quote}
{noformat}

    basic_filebuf<charT,traits>* open(const char* s, ios_base::openmode mode);
    basic_filebuf<charT,traits>* open(const wchar_t* ws, ios_base::openmode 
mode);

{noformat}

    ??Effects??: If {{is_open() != false}}, returns a null pointer. Otherwise, 
initializes the {{filebuf}} as required. It then opens a file, if possible, 
whose name is the NTBS ??s?? ("as if" by calling {{std::fopen(??s??, 
??modstr??)}}). For the second signature, the NTBS ??s?? is determined from the 
WCBS ??ws?? in an implementation-defined manner.

    (NOTE: For a system that "naturally" represents a filename as a WCBS, the 
NTBS ??s?? in the first signature may instead be mapped to a WCBS; if so, it 
follows the same mapping rules as the first argument to {{open}}.)
{quote}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to