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]

ss-980315: regression at templates


Hi,

The following code (extracted from Blitz++) compiles well with gcc 2.8.1
, egcs pre1.0.2 and egcs-2.91.12.
The last snapshot refuses to say anything, it seems to hang.

Thomas 

g++ -v

Reading specs from /opt/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.14/specs
gcc version egcs-2.91.14 980315 (gcc-2.8.0 release)    

--

class Tiny{};

template<class P_expr>
class Expr{};

template<class P>
class TinyVector {
public:
    typedef TinyVector  T_vector;
    typedef Tiny Iterator;
    template<class E>
    T_vector& operator=( const Expr<E>& );
    template<class P2> 
    T_vector& operator=(const TinyVector<P2> &){
	(*this) = Expr<typename TinyVector<P2> ::Iterator>();
	return *this;
    }

};

TinyVector<int>  aaa;


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