Al seguente rigaerrore di tipo incompleto sull'uso boost :: enable_shared_from_this
class Symbol : public boost::enable_shared_from_this<Symbol> {
ottengo l'errore:
errore: Utilizzo non valido di tipo incompleto struct boost::enable_shared_from_this<Symbol>
/usr/include/boost/smart_ptr/shared_ptr.hpp: 63: errore: dichiarazione di struct boost::enable_shared_from_this<Symbol>
Qualche idea sul perché ottengo questo errore. Symbol è una classe astratta (se quello che conta)
voglio passare uno shared_ptr a 'this' a funzioni che accettano boost :: shared_ptr. Ho usato l'idea da http://stackoverflow.com/questions/712279/what-is-the-usefulness-of-enable-shared-from-this –
@JerryCoffin: Er, è specificatamente * * progettato per essere una classe di base . –
@CatPlusPlus: Oops: tutto a posto. Immagino che avrei dovuto guardarmi prima di saltare dentro ... –