The kludge used as a workaround for PR 26261 doesn't work any more:
-----------------------
template <int dim> class X {};

template <class T> class Y {
    static const unsigned int dim = 1;
    X<Y<T>::dim> f();
};

template <class T>
X<Y<T>::dim> Y<T>::f() { return X<dim>(); }
------------------------------

This compiled with gcc 4.3, but with a mainline snapshot from
last October we get this:

a.cc:9:14: error: prototype for 'X<Y::dim> Y<T>::f()' does not match any in
class 'Y<T>'
a.cc:5:18: error: candidate is: X<1> Y<T>::f()

So this is a regression.

Best
 W.


-- 
           Summary: [4.5 regression] Rejects template with const static data
                    member used in return type
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at gmail dot com
OtherBugsDependingO 26261
             nThis:


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

Reply via email to