- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
// precondition: you already have a boost::shared_ptr<> to this or a derived object
template<typename T>
inline boost::shared_ptr<T> get_shared_ptr()
{
// this cast lets the compiler verify the type compatibility
assert( dynamic_cast<typename boost::shared_ptr<T>::element_type*>( &(*shared_from_this()) ) != 0);
return *(boost::shared_ptr<T>*) &shared_from_this();
}
Амфибрахии?
Ну, это зависит от поэтических способностей программиста.
>это зависит от поэтических способностей программиста
пантомимические же
We are же.
Читать далее: http://ru.wikipedia.org/wiki/Thou
thou art schītte
Читать далее: http://en.wikipedia.org/wiki/Middle_English