public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/54575] [4.8 Regression] ICE with std::vector::insert and -std=c++11
Date: Fri, 14 Sep 2012 17:38:00 -0000 [thread overview]
Message-ID: <bug-54575-4-XJW41C9meN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54575-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54575
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-14 17:38:07 UTC ---
(In reply to comment #4)
> Would this do? ;-)
> ......................................
> template<typename _From, typename _To>
> struct is_convertible { static const bool value = true; };
>
> template<bool> struct enable_if { };
> template<> struct enable_if<true> { typedef int type; };
>
> template<typename _InIter>
> using _RequireInputIter
> = typename enable_if<is_convertible<_InIter,bool>::value>::type;
>
> template<typename _Tp> struct X {
> template<typename _InputIterator,
> typename = _RequireInputIter<_InputIterator>>
> void insert(_InputIterator) {}
> };
>
> template<typename> void foo() {
> X<int> subdomain_indices;
> subdomain_indices.insert(0);
> }
> .........................................
>
>
> gcc -std=c++11 -c x.ii
> x.ii: In function 'void foo()':
> x.ii:13:7: internal compiler error: tree check: expected class 'type', have
> 'exceptional' (error_mark) in strip_typedefs, at cp/tree.c:1215
> typename = _RequireInputIter<_InputIterator>>
> ^
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
This is caused by revision 190830:
http://gcc.gnu.org/ml/gcc-cvs/2012-08/msg00808.html
next prev parent reply other threads:[~2012-09-14 17:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 0:33 [Bug c++/54575] New: " bangerth at gmail dot com
2012-09-14 8:35 ` [Bug c++/54575] " rguenth at gcc dot gnu.org
2012-09-14 10:11 ` [Bug c++/54575] [4.8 Regression] " paolo.carlini at oracle dot com
2012-09-14 10:43 ` paolo.carlini at oracle dot com
2012-09-14 11:49 ` bangerth at gmail dot com
2012-09-14 12:00 ` paolo.carlini at oracle dot com
2012-09-14 16:26 ` paolo.carlini at oracle dot com
2012-09-14 17:38 ` hjl.tools at gmail dot com [this message]
2012-09-14 18:22 ` paolo.carlini at oracle dot com
2012-09-15 8:51 ` paolo.carlini at oracle dot com
2012-09-17 15:28 ` paolo.carlini at oracle dot com
2012-09-18 3:47 ` jason at gcc dot gnu.org
2012-09-18 9:41 ` paolo.carlini at oracle dot com
2012-09-18 13:55 ` paolo.carlini at oracle dot com
2012-09-18 15:32 ` bangerth at gmail 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-54575-4-XJW41C9meN@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).