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]

[Bug c++/13128] New: Parse error while using template method in template function


The following code gives a parse error in the bug() function but not in the ok()
function. The only difference between the two functions is the use of a template
for bug().
It have been tried with gcc 3.3.2 on solaris and gcc 3.2.2 on Linux.

class Object
{
public:
  template <typename T>
  T &value();
};


void ok()
{
  Object o;
  o.value<double>();
}


template <typename T>
void bug()
{
  Object o;
  o.value<double>();
}

-- 
           Summary: Parse error while using template method in template
                    function
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at sapetnioc dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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