[ConceptGCC] |
ConceptGCC :Using concept maps as adapters to provide associated member functions for non-class types |
From: Tom Honermann (tom.honermann_at_[hidden])
Date: 2007-06-07 20:33:33
I've been looking through the latest concept spec
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2193.pdf) and
I don't see this mentioned explicitly there. I've been playing with
code like the following and I'm not sure if I'm getting the syntax
wrong, if conceptgcc doesn't yet support this, or if I'm assuming
functionality that is not planned (and perhaps doesn't make sense).
concept A<typename T> {
int T::F();
}
concept_map A<char> {
int A<char>::F() { return 1; }
}
template<A T>
int test(T t) {
return t.F();
}
int main() {
return test('c'); // should return 1
}
Attempting to compile this (Linux/conceptgcc-boostcon) results in:
error: extra qualification 'A<char>::' on member 'F'
error: creating pointer to member function of non-class type 'char'
Tom.