Title says it all really. Sample code which illustrates the spirit of the affaire:
if( std::is_constructible<T, unsigned long>::value )
{
unsigned long identity = collection.rbegin()->first + 1;
std::shared_ptr<T> newObject(new T(identity));
collection.insert( identity , newObject );
return true;
}
else
{
return false;
}
Aucun commentaire:
Enregistrer un commentaire