Indiana Unversity logo[ConceptGCC]

ConceptGCC :

Re: error: 'Foo' has no copy constructor

From: Niels Dekker (nielsprogramming_at_[hidden])
Date: 2009-01-09 09:38:34


Sumant Tambe wrote:
> I'm getting the an error saying 'KindLit<Kind>' has no copy
> constructor in the attached simple program. As a result of the error,
> apply function also fails to compile. If I comment out the empty
> copy-constructor, the program compiles. Is there something wrong I'm
> doing? I'm using ConceptGCC 4.3.0 Alpha 7.

> #include "concepts.h"

Should be <concepts>, of course!

> auto concept ElementConcept <typename T>
> { };
>
> template <class Kind>
> requires ElementConcept<Kind>
> class KindLit
> {
> public:
> KindLit(KindLit const & k) {}
> KindLit apply () { KindLit k; return k; }
> };

Looks like a compile bug to me. I think your code is fine (except for
the "concepts.h").

Kind regards, Niels

--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center