Indiana Unversity logo[ConceptGCC]

ConceptGCC :

I have some Questions

From: hirohito none (hitobasira_at_[hidden])
Date: 2008-08-22 17:42:32


I have 3 questions.

1. I can call destructor

auto concept Foo< typename T >
{ T::T() ; }

template < typename T > requires Foo < T >
void f()
{
        T x ;
        // destructor will be called.
}

Is this a valid code? or ill-formed?

2. I can not call destructor

auto concept Bar< typename T >
{
        T::T() ;
        T::~T() ;
}

template < typename T > requires Bar< T >
void g()
{
        T x ;
        x.~T() ;// error: the type being destroyed is 'T', but the
destructor refers to 'T'
}

Although destructor is called twice, I think it should be compiled.

3. I can not require operator new in concept
ConceptGCC does not supported it yet?