Indiana Unversity logo[ConceptGCC]

ConceptGCC :

Re: Possible bug?

From: Daniel Lincke (daniel.lincke_at_[hidden])
Date: 2007-10-08 08:09:35


Things are even more strange:

in TEST:

* Version 1:
...
    void foo() {
    ct_type c_t;
    }

    type1 foo2() {
    ct_type c_t;
    }
...

* Version 2:
...
    void foo() {
    //ct_type c_t;
    }

    type1 foo2() {
    ct_type c_t;
    }
...

* Version 3:
...
    // void foo() {
    // ct_type c_t;
    // }

    type1 foo2() {
    ct_type c_t;
    }
...

Activating the requirement clause, I get the following results:

Version 1:
/opt/conceptgcc-4.3/bin/conceptg++ -include bits/stdc++.h -c -o
main.o main.cpp
main.cpp: In member function ‘void TEST<C, T>::foo()’:
main.cpp:53: error: ‘c_t’ has incomplete type
make: *** [main.o] Fehler 1

Version 2:
ok!

Version 3:
/opt/conceptgcc-4.3/bin/conceptg++ -include bits/stdc++.h -c -o
main.o main.cpp
main.cpp: In member function ‘type_transformation_concept<C<T> >::type1
TEST<C, T>::foo2()’:
main.cpp:57: error: ‘c_t’ has incomplete type
make: *** [main.o] Fehler 1

This dosen't make a lot of sence ...

Greets, Daniel

Daniel Lincke wrote:
> 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
> _______________________________________________
> ConceptGCC mailing list
> ConceptGCC_at_[hidden]
> http://www.osl.iu.edu/mailman/listinfo.cgi/conceptgcc
>
>
>