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 c++/51989] std::deque::iterator recognised as container Date: Wed, 25 Jan 2012 10:26:00 -0000 [thread overview] Message-ID: <bug-51989-4-6JSjeO0dGW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51989-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51989 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-25 09:55:25 UTC --- However, I think it is a bug that this is rejected. template <typename T> struct is_container { template <typename U, typename V = decltype(((U*)0)->begin())> static char test( U* u); template <typename U> static long test(...); enum { value = sizeof test<T>(0) == 1 }; }; int main() { return is_container< void >::value; } c.cc: In instantiation of ‘struct is_container<void>’: c.cc:12:32: required from here c.cc:3:27: error: ‘void*’ is not a pointer-to-object type Jason, shouldn't deduction fail for ((U*)0)->foo() with U=void instead of giving an error?
next prev parent reply other threads:[~2012-01-25 9:56 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-25 6:59 [Bug c++/51989] New: " leonid at volnitsky dot com 2012-01-25 7:41 ` [Bug c++/51989] " leonid at volnitsky dot com 2012-01-25 8:12 ` leonid at volnitsky dot com 2012-01-25 8:27 ` leonid at volnitsky dot com 2012-01-25 10:16 ` redi at gcc dot gnu.org 2012-01-25 10:26 ` redi at gcc dot gnu.org [this message] 2012-01-25 10:42 ` leonid at volnitsky dot com 2012-01-25 12:30 ` redi at gcc dot gnu.org 2012-01-25 12:42 ` leonid at volnitsky dot com 2012-01-25 18:18 ` jason at gcc dot gnu.org 2012-01-25 21:19 ` paolo.carlini at oracle dot com 2012-03-02 16:19 ` paolo at gcc dot gnu.org 2012-04-24 12:13 ` paolo.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-51989-4-6JSjeO0dGW@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: linkBe 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).