[RFC] libstdc++/9626 and std::vector constructors

Paolo Carlini pcarlini@unitus.it
Sat Feb 8 15:50:00 GMT 2003


... it turns out that, for _very_ subtle reasons, submitter's
testcase is not illegal at all.

Therefore, I have closed the PR: see the final part of the audit
trail for details.

However, I'm still puzzled as regards why, in our implementation,
we have:

     explicit
     vector(const allocator_type& __a = allocator_type());

     vector(size_type __n, const value_type& __value,
            const allocator_type& __a = allocator_type());

     explicit
     vector(size_type __n);

instead of:

    explicit
    vector(const allocator_type& __a = allocator_type());

    explicit
    vector(size_type __n, const value_type& __value = value_type(),
           const allocator_type& __a = allocator_type());

according to the letter of the standard.

Are they equivalent or not?

Thanks,
Paolo.



More information about the Libstdc++ mailing list