Re: Avoid typename repetition in template specialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

Thanks John and Axel!

But, as I have a lot of these constructs typedef is exactly the problem:

  typedef PScalar< PColorMatrix< RComplex<REAL64>, Nc> > T1;
  typedef PSpinVector< PColorVector< RComplex<REAL64>, Nc>, Ns > T2;
  typedef OpMultiply Op;
  template<>
  inline BinaryReturn< T1 , T2 , Op >::Type_t
  operator*(const T1& l, const T2& r )
  {
    BinaryReturn< T1 , T2 , Op >::Type_t d;
    // code
    return d;
  }

now, this conflicts:

  typedef PSpinVector< PColorVector< RComplex<REAL64>, Nc>, Ns > T1;
  typedef PSpinVector< PColorVector< RComplex<REAL64>, Nc>, Ns > T2;
  typedef OpMultiply Op;
  template<>
  inline BinaryReturn< T1 , T2 , Op >::Type_t
  operator+(const T1& l, const T2& r )
  {
    BinaryReturn< T1 , T2 , Op >::Type_t d;
	// code
    return d;
  }

If there would be a way to undefine a typename in the actual namespace this would help a lot in this case. Is there functionality for this or is there a workaround for my case that occurs to you?

Best regards,
Frank Winter



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux