[Bug libstdc++/38265] STL treats explicit constructors as converting constructors

paolo dot carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 28 11:41:00 GMT 2008



------- Comment #9 from paolo dot carlini at oracle dot com  2008-11-28 11:40 -------
... and I'm coming to the conclusion that this is not a bug in our library.
Consider the std::vector case: I cannot see anything wrong with using
std::uninitialized_copy in the implementation of the constructor. In turn, the
former does, per the Standard:

   ::new(static_cast<void*>(&*__cur)) typename
      iterator_traits<_ForwardIterator>::value_type(*__first);

thus, the explicit constructor can be used.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38265



More information about the Gcc-bugs mailing list