This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5613: g++ is unable to find the proper output operator '<<' for tenplate class with two template arguments



>Number:         5613
>Category:       c++
>Synopsis:       g++ is unable to find the proper output operator '<<' for tenplate class with two template arguments
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 06 08:26:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     kloska@scienion.de
>Release:        2.95.3
>Organization:
>Environment:
linux kernel 2.4
>Description:
g++ 2.95.3 is aunable to find the proper output operator '<<'
for a template class with two arguments in the form

template<class CODE,CODE DEFAULT> 
class Container {
 
}

The logic behind this is that I wanted to create a
generic container of type CODE with the default
value DEFAULT.

It works fine with egcs-1.1.2 and the intel c++

 
>How-To-Repeat:
compile the attached file
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc"

I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8Y2xhc3MgVFlQRSxUWVBFIERFRkFVTFQ+IApj
bGFzcyBHYUdhIHsKcHVibGljOgogIC8vIHN0YW5kYXJkIGNvbnN0cnVjdG9yLiBJbml0aWFsaXpl
CiAgLy8gd2l0aCB0aGUgZGVmYXVsdCB2YWx1ZQogIEdhR2EoKSB7CiAgICBhPTExMTsKICB9OwoK
ICAvLyByZXRyaWV2ZSB0aGUgY3VycmVudCBjb250ZW50cwogIFRZUEUgZ2V0KCkgewogICAgcmV0
dXJuIGE7CiAgfQoKcHJpdmF0ZToKICBUWVBFIGE7Cn07Cgp0ZW1wbGF0ZTxjbGFzcyBUWVBFLFRZ
UEUgREVGQVVMVD4Kb3N0cmVhbSAmIG9wZXJhdG9yPDwob3N0cmVhbSAmIG9zLEdhR2E8VFlQRSxE
RUZBVUxUPiAmIGcpIHsKICBvcyA8PCAiIDw8ICIgPDwgZy5nZXQoKSA8PCAiID4+ICIgPDwgZW5k
bDsKICByZXR1cm4gb3M7Cn07CgppbnQgbWFpbigpCgp7CQogIEdhR2E8aW50LDExMT4gZzsKICBj
ZXJyIDw8IGcgPDwgZW5kbDsKICByZXR1cm4gMDsKfQoK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]