[patch] [libcxx] deque the intended version!

G M gmisocpp at gmail.com
Tue Oct 8 18:18:49 PDT 2013


Hi Marshall

When I look at my patch (the one that doesn't include the kitchen sink) on
my machine it refers to this routine:

// line 1438:

+#if _LIBCPP_STD_VER > 11 // added by me.

template <class _Tp, class _Allocator>

deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)

: __base(__a)

{

if (__n > 0)

__append(__n);

}
+#endif // added by me because otherwise there's no matching declaration.

For which the explicit constructor has the same #if _LIBCPP_STD_VER > 11

// The constructor is on line 1213 in my file.

#if _LIBCPP_STD_VER > 11

explicit deque(size_type __n, const _Allocator& __a);

#endif




On Wed, Oct 9, 2013 at 1:33 PM, Marshall Clow <mclow.lists at gmail.com> wrote:

> On Oct 8, 2013, at 4:56 PM, G M <gmisocpp at gmail.com> wrote:
>
> > patch intended (ironically) to fix a possible versioning mistake.
> > <deque.diff>
>
> It would be easier for me (in the future) if you'ld add a bit more context
> here.
> [ Note: You are not alone in this; I have failed to explain what I'm
> trying to achieve with a patch, too ]
>
> But, looking at your patch, it appears that you want to wrap the following
> routine
>
> template <class _Tp, class _Allocator>
> template <class _InputIter>
> void
> deque<_Tp, _Allocator>::assign(_InputIter __f, _InputIter __l,
>                                typename
> enable_if<__is_input_iterator<_InputIter>::value &&
>
>  !__is_random_access_iterator<_InputIter>::value>::type*)
> {
>> }
>
> in an
> #if _LIBCPP_STD_VER > 11
> #endif
>
> block. Is this correct?
>
> If so, I think you are mistaken, since my copy of the C++11 standard
> (N3290) shows the following routine for deque:
>          template <class InputIterator>
>            void assign(InputIterator first, InputIterator last);
>
>
> What makes you think that this routine did not exist in C++11?
>
> -- Marshall
>
> Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>
>
> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is
> promptly moderated down to (-1, Flamebait).
>         -- Yu Suzuki
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131009/448a18eb/attachment.html>


More information about the cfe-commits mailing list