This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/43813] [DR1234] vector<T*>(3, NULL) fails to compile


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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #9 from Marc Glisse <marc.glisse at normalesup dot org> 2011-10-28 09:59:58 UTC ---
(In reply to comment #8)
> Note: if the *only* way to change the behevior for the best requires using
> enable_if on the user-level member functions (as, if I remember correctly,
> pioneered by Howard at Metrowerks quite a few years ago),

The resolution to 1234 has been adopted for C++11. The standard now says: "the
constructor shall not participate in overload resolution", not that the call
should be dispatched to an appropriate function. If there is an observable
difference, that makes the dispatch technique wrong.

> we have to make sure
> we do it consistently over all the dispatchings in the containers, and check
> what happens if a binary built with the headers using the old-style dispatching
> is linked to a new one. In case, restrict the mechanism to C++0x mode. But
> really, I'd rather wait for a resolution anyway, even as NAD but clearly
> stating this is a QoI issue.

I don't think adding an extra template parameter or an extra argument to the
function (and removing the unnecessary functions) creates any incompatibility,
but you have more experience with that.

In C++11 mode (where libstdc++ has sfinae-friendly iterator_traits), we could
check something like is_convertible<typename
iterator_traits<_Iterator>::iterator_category, input_iterator_tag>.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]