public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19047] New: Template template argument matching can violate SFINAE
@ 2004-12-16 22:54 benh at bwsint dot com
  2004-12-16 23:02 ` [Bug c++/19047] " benh at bwsint dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: benh at bwsint dot com @ 2004-12-16 22:54 UTC (permalink / raw)
  To: gcc-bugs

The following program fails to compile:

#include <iostream>

template<template<int> class CT, int TA>
void operator<<(CT<TA>, int);

int main()
{
   std::cout << "Hello, world\n";
}

The error messages given are:
test.cpp: In function `int main()':
test.cpp:8: error: template argument 2 is invalid

-- 
           Summary: Template template argument matching can violate SFINAE
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benh at bwsint dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/19047] Template template argument matching can violate SFINAE
  2004-12-16 22:54 [Bug c++/19047] New: Template template argument matching can violate SFINAE benh at bwsint dot com
  2004-12-16 23:02 ` [Bug c++/19047] " benh at bwsint dot com
@ 2004-12-16 23:02 ` pinskia at gcc dot gnu dot org
  2004-12-16 23:28 ` [Bug c++/19047] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-16 23:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|2.95.4                      |2.95.4 4.0.0


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


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

* [Bug c++/19047] Template template argument matching can violate SFINAE
  2004-12-16 22:54 [Bug c++/19047] New: Template template argument matching can violate SFINAE benh at bwsint dot com
@ 2004-12-16 23:02 ` benh at bwsint dot com
  2004-12-16 23:02 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: benh at bwsint dot com @ 2004-12-16 23:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|                            |i486-linux
   GCC host triplet|                            |i486-linux
 GCC target triplet|                            |i486-linux
           Keywords|                            |rejects-valid
      Known to fail|                            |3.0.4 3.2.3 3.3.4 3.4.3
      Known to work|                            |2.95.4


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


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

* [Bug c++/19047] [3.3/3.4 Regression] Template template argument matching can violate SFINAE
  2004-12-16 22:54 [Bug c++/19047] New: Template template argument matching can violate SFINAE benh at bwsint dot com
  2004-12-16 23:02 ` [Bug c++/19047] " benh at bwsint dot com
  2004-12-16 23:02 ` pinskia at gcc dot gnu dot org
@ 2004-12-16 23:28 ` pinskia at gcc dot gnu dot org
  2004-12-16 23:29 ` pinskia at gcc dot gnu dot org
  2004-12-17  0:13 ` bangerth at dealii dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-16 23:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-16 23:28 -------
Reduced testcase:

template<class _CharT> struct char_traits {};

template<typename _CharT, typename _Traits = char_traits<_CharT> >
  class basic_ostream {};
template<class _Traits>
  basic_ostream<char, _Traits>&
  operator<<(basic_ostream<char, _Traits>& __out, const char* __s);

extern basic_ostream<char> cout;

template<template<int> class CT, int TA>
void operator<<(CT<TA>, int);

int main()
{
   cout << "Hello, world\n";
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-16 23:28:32
               date|                            |
            Summary|Template template argument  |[3.3/3.4 Regression]
                   |matching can violate SFINAE |Template template argument
                   |                            |matching can violate SFINAE
   Target Milestone|---                         |3.4.4


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


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

* [Bug c++/19047] [3.3/3.4 Regression] Template template argument matching can violate SFINAE
  2004-12-16 22:54 [Bug c++/19047] New: Template template argument matching can violate SFINAE benh at bwsint dot com
                   ` (2 preceding siblings ...)
  2004-12-16 23:28 ` [Bug c++/19047] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-12-16 23:29 ` pinskia at gcc dot gnu dot org
  2004-12-17  0:13 ` bangerth at dealii dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-16 23:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-16 23:28 -------
Fixed on the mainline:
: Search converges between 2004-11-14-014001-trunk (#634) and 2004-11-14-161001-trunk 
(#635).


-- 


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


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

* [Bug c++/19047] [3.3/3.4 Regression] Template template argument matching can violate SFINAE
  2004-12-16 22:54 [Bug c++/19047] New: Template template argument matching can violate SFINAE benh at bwsint dot com
                   ` (3 preceding siblings ...)
  2004-12-16 23:29 ` pinskia at gcc dot gnu dot org
@ 2004-12-17  0:13 ` bangerth at dealii dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2004-12-17  0:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-12-17 00:12 -------
This is a duplicate of one of the weirdest bugs we have ever had, PR 17344. 
W. 

*** This bug has been marked as a duplicate of 17344 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2004-12-17  0:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-16 22:54 [Bug c++/19047] New: Template template argument matching can violate SFINAE benh at bwsint dot com
2004-12-16 23:02 ` [Bug c++/19047] " benh at bwsint dot com
2004-12-16 23:02 ` pinskia at gcc dot gnu dot org
2004-12-16 23:28 ` [Bug c++/19047] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2004-12-16 23:29 ` pinskia at gcc dot gnu dot org
2004-12-17  0:13 ` bangerth at dealii dot org

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