Indiana Unversity logo[ConceptGCC]

ConceptGCC :

Error: expected template-name before ..

From: Mirko Stocker (me_at_[hidden])
Date: 2009-03-17 16:51:57


Hello,

I've just tried to do my first steps with ConceptGCC (I'm writing a paper on
concepts and refactoring in a seminar at the university), but I can't get the
simplest example to compile:

#include <concepts>

template<std::CopyConstructible T>
  requires Addable<T>, Assignable<T>
  T sum(T array[], int n, T result)
  {
    for (int i = 0; i < n; ++i)
      result = result + array[i];
    return result;
  }

int main ()
{
  return 0;
}

I get two errors:
error: expected template-name before ‘<’ token
error: expected unqualified-id before ‘<’ token

when invoking bin/conceptg++ on my source file.

Thank you for your help

Mirko Stocker