public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/43813] [DR1234] vector<T*>(3, NULL) fails to compile
Date: Sun, 04 Mar 2012 12:02:00 -0000 [thread overview]
Message-ID: <bug-43813-4-rC1GsJzjJd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-43813-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43813
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-04 12:00:52 UTC ---
(In reply to comment #14)
> Well, besides wrapping the thing in an __is_input_iterator helper.
That's what I was going to suggest, possibly using an alias template:
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ private:
+ template<typename _InIter>
+ using _RequireInputerIter = typename
+ enable_if<is_convertible<typename
+ iterator_traits<_InputIterator>::iterator_category,
+ input_iterator_tag>::value>::type;
+
+ public:
+ template<typename _InputIterator, typename =
+ _RequireInputIter<_InputIterator>>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ typedef typename iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_range_initialize(__first, __last, _IterCategory());
+ }
+#else
next prev parent reply other threads:[~2012-03-04 12:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-43813-4@http.gcc.gnu.org/bugzilla/>
2011-10-28 10:00 ` marc.glisse at normalesup dot org
2012-02-23 1:02 ` jyasskin at gcc dot gnu.org
2012-02-23 11:37 ` paolo.carlini at oracle dot com
2012-02-23 12:47 ` paolo.carlini at oracle dot com
2012-03-04 11:32 ` paolo.carlini at oracle dot com
2012-03-04 11:39 ` paolo.carlini at oracle dot com
2012-03-04 12:02 ` redi at gcc dot gnu.org [this message]
2012-03-04 12:59 ` paolo.carlini at oracle dot com
2012-03-04 13:07 ` redi at gcc dot gnu.org
2012-03-05 1:16 ` paolo at gcc dot gnu.org
2012-03-05 1:18 ` paolo.carlini at oracle dot com
2012-03-07 18:44 ` redi at gcc dot gnu.org
2010-04-20 7:07 [Bug libstdc++/43813] New: " jyasskin at gmail dot com
2010-04-20 9:40 ` [Bug libstdc++/43813] [DR1234] " redi at gcc dot gnu dot org
2010-04-20 9:41 ` redi at gcc dot gnu dot org
2010-04-20 16:11 ` paolo dot carlini at oracle dot com
2010-04-20 16:36 ` jyasskin at gmail dot com
2010-04-20 16:50 ` redi at gcc dot gnu dot org
2010-04-20 17:00 ` redi at gcc dot gnu dot org
2010-04-20 20:04 ` jyasskin at gmail dot com
2010-04-21 0:33 ` paolo dot carlini at oracle dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-43813-4-rC1GsJzjJd@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).