public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59056] New: enable_if turns a non-ambiguous template into an ambiguous one
@ 2013-11-08 22:19 walter.mascarenhas at gmail dot com
  2013-11-08 22:35 ` [Bug c++/59056] " paolo.carlini at oracle dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: walter.mascarenhas at gmail dot com @ 2013-11-08 22:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59056
           Summary: enable_if turns a non-ambiguous template into an
                    ambiguous one
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: walter.mascarenhas at gmail dot com

Created attachment 31187
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31187&action=edit
a simple code illustrating the bug

The attached file shows that by turning a specialization of

template <class A, class Enable = void>
struct Foo {};

like this one (which works just fine)

template <class A>
struct Foo<A, void>{};

into 

template <class A>
struct Foo<A, std::enable_if< typename always_true<A>() >::type >{};

we can get ambigouities, even when typename always_true<A>() >::type
always resolves to void.

For more details, look at the attachement


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-11-14 10:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-08 22:19 [Bug c++/59056] New: enable_if turns a non-ambiguous template into an ambiguous one walter.mascarenhas at gmail dot com
2013-11-08 22:35 ` [Bug c++/59056] " paolo.carlini at oracle dot com
2013-11-09 12:58 ` redi at gcc dot gnu.org
2013-11-11 11:37 ` redi at gcc dot gnu.org
2013-11-13 11:11 ` paolo.carlini at oracle dot com
2013-11-13 21:00 ` richard-gccbugzilla at metafoo dot co.uk
2013-11-13 23:16 ` [Bug c++/59056] ambiguous call to function templates overloads not diagnosed redi at gcc dot gnu.org
2013-11-14  2:26 ` [Bug c++/59056] ambiguous call to function template " walter.mascarenhas at gmail dot com
2013-11-14  3:04 ` richard-gccbugzilla at metafoo dot co.uk
2013-11-14 10:20 ` walter.mascarenhas at gmail dot com

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).