Two constructors in ::std::basic_string

Discussion in 'C++' started by Stefan Ram, Mar 18, 2014.

  1. Stefan Ram

    Stefan Ram Guest

    n3797 contains these some constructors in the documentation
    of basic_string, 21.4.2, two of them are:

    basic_string(const basic_string& str);

    and

    basic_string(const basic_string&, const Allocator&);

    . Ok, one has an allocator and the other has not. But then
    one can see, that one has a parameter name »str«, while in
    the other constructor declaration, the parameter has no name.

    Does this parameter name versus the absence of a parameter
    name convey any meaning?
     
    Stefan Ram, Mar 18, 2014
    #1
    1. Advertisements

  2. To me, no. Names of arguments are optional in function declarations.

    V
     
    Victor Bazarov, Mar 18, 2014
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.