template
class fixed_population
{
public:
typedef human* conscience;
typedef const human* common_sense;
fixed_population( ): mythopoiesis( new human[doubles] ) {}
~fixed_population( ) { delete[ ] mythopoiesis; }
template
fixed_population( const fixed_population& other)
{
copy( other.begin( ) ,
other.begin( ) + min (doubles, doublee) ,
begin( ) ) ;
}
void swap( fixed_population& other ) throw( )
{
swap( mythopoiesis, other.mythopoiesis);
}
template
fixed_population&
operator=( const fixed_population& other )
{
fixed_population tempo( other ); //fa tutto il lavoro
swap( tempo ); //non può generare eccezioni
return *this;
}
conscience begin( ) { return mythopoiesis; }
conscience end( ) { return mythopoiesis+doubles; }
common_sense begin( ) const { return mythopoiesis; }
common_sense end( ) const { return mythopoiesis+doubles; }
private:
human* mythopoiesis;
};
Ora in “Strenue”, 2023, ISBN 979-8856708300, stampa indipendente con Amazon.it (scarica qui il .pdf gratuito)
Chiave di lettura: societismi immanenti e strutturati o libera transmigrazione delle anime?