public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17327] New: use of `enumeral_type' in template type unification
@ 2004-09-05 12:50 hansen-lars at t-online dot de
  2004-09-06 14:27 ` [Bug c++/17327] [3.3/3.4/3.5 Regression] " lerdsuwa at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hansen-lars at t-online dot de @ 2004-09-05 12:50 UTC (permalink / raw)
  To: gcc-bugs

Version:
--------
http://mesh.dl.sourceforge.net/sourceforge/mingw/gcc-core-3.4.1-20040711-
1.tar.gz

Using built-in specs.
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug

Thread model: win32

gcc version 3.4.1 (mingw special)




Compiler settings: 
------------------
g++.exe "F:\Daten\Projekte\CPP\trainingGNU\templates.cpp" -
o "F:\Daten\Projekte\CPP\trainingGNU\templates.exe"    -I"C:\Dev-
Cpp\include\c++\3.4.1"  -I"C:\Dev-Cpp\include\c++\3.4.1\mingw32"  -I"C:\Dev-
Cpp\include\c++\3.4.1\backward"  -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.1\include"  -
I"C:\Dev-Cpp\include"   -L"C:\Dev-Cpp\lib" 




Messages:
---------
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp: In instantiation of `A<E>':
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:47:   instantiated from here
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use 
of `enumeral_type' in template type unification

F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use 
of `enumeral_type' in template type unification

F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use 
of `enumeral_type' in template type unification

F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use 
of `enumeral_type' in template type unification

F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use 
of `enumeral_type' in template type unification




Problem:
--------
The code can be compiled successfully with other compilers like Comeau or 
Borland BuilderX and runs proper.




Source:
-------
    #include <iostream>
    #include <cstdlib>
    using namespace std;
    
    //////////////////////////////////////////////////////////////////////
    
    enum E
    {
        E0,
        E1
    };
    
    //////////////////////////////////////////////////////////////////////
    
    template <typename T>
    class A;
    
    template <typename T>
    ostream& operator << (ostream& out, A<T> a);
    
    template <typename T>
    class A
    {
        friend ostream& operator << <T> (ostream& out, A<T> a);
        int mI;
    
    public:
        A(int i) { mI = i; }
    };
    
    template <typename T>
    ostream& operator << (ostream& out, A<T> a)
    {
        out << a.mI;
        return out;
    
    }

    //////////////////////////////////////////////////////////////////////
    
    int main()
    {
        A<int> a = 5;
    
        cout << a << endl;
    
        A<E> b = 4;
    
        cout << b << endl;
    
        system("Pause");
    
        return 0;
    }

-- 
           Summary: use of `enumeral_type' in template type unification
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hansen-lars at t-online dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-09-14  0:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
2004-09-06 14:27 ` [Bug c++/17327] [3.3/3.4/3.5 Regression] " lerdsuwa at gcc dot gnu dot org
2004-09-06 14:28 ` lerdsuwa at gcc dot gnu dot org
2004-09-06 14:41 ` giovannibajo at libero dot it
2004-09-06 17:16 ` lerdsuwa at gcc dot gnu dot org
2004-09-09  4:30 ` mmitchel at gcc dot gnu dot org
2004-09-14  0:29 ` [Bug c++/17327] [3.3/3.4/4.0 " cvs-commit at gcc dot gnu dot org
2004-09-14  0:44 ` cvs-commit at gcc dot gnu dot org
2004-09-14  0:44 ` mmitchel at gcc dot gnu 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).