[ConceptGCC] |
ConceptGCC :Possible bug? |
From: Daniel Lincke (daniel.lincke_at_[hidden])
Date: 2007-10-08 07:57:08
Hi,
I'm still exploring ConceptGCC, and there is some behaviour of
ConceptGCC, which I don't understand. Might this be a bug? If not, it is
at least a confusing error message ... :
=======================================================================
#ifdef __GXX_CONCEPTS__
#include <concepts>
#endif
using namespace std;
#ifdef __GXX_CONCEPTS__
concept type_transformation_concept<class C> {
typename type1;
typename type2;
};
#endif
template <template<class> class C, typename T>
class TEST {
typedef C<T> ct_type;
#ifdef __GXX_CONCEPTS__
// requires type_transformation_concept<ct_type>
#endif
typedef typename ct_type::type1 type1;
typedef typename ct_type::type2 type2;
void foo() {
ct_type c_t; // LINE 53 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
};
int main (int argc, char *argv[]) {
}
===========================================================
If I compile this with activating the requirement clause before, I get
the following error:
main.cpp: In member function void TEST<C, T>::foo():
main.cpp:53: error: c_t has incomplete type
make: *** [main.o] Fehler 1
If I deactivate the requirement everything works fine ...
Why this?
Greets Daniel