Re: being copy constructible
Ivan Novick wrote:
James Kanze wrote:
[...]
#include <vector>
struct C
{
C() {}
C( C& ) {}
} ;
int
main()
{
std::vector< C > v ;
return 0 ;
}
[...]
This code does compile on my box: g++ (GCC) 3.2.3 20030502 (Red Hat
Linux 3.2.3-54) with -Wall -pedantic
Try a version later than 4.0, with the options:
-std=c++98 -pedantic -ffor-scope -fno-gnu-keywords
-foperator-names -Wall -W -Wno-sign-compare -Wno-deprecated
-Wno-non-virtual-dtor -Wpointer-arith -Wno-unused
-Wno-switch -D_GLIBCXX_CONCEPT_CHECKS -D_GLIBCXX_DEBUG
-D_GLIBCXX_DEBUG_PEDANTIC
(There are doubtlesslly some in there that you don't need, but
they're the ones I normally use.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]