Two constructors in ::std::basic_string

S

Stefan Ram

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?
 
V

Victor Bazarov

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?

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

V
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top