improve documentation for alert_cast
This commit is contained in:
parent
b5fc367d17
commit
f6b18c7097
|
@ -299,8 +299,12 @@ namespace libtorrent {
|
|||
time_point m_timestamp;
|
||||
};
|
||||
|
||||
// When you get an alert, you can use ``alert_cast<>`` to attempt to cast the pointer to a
|
||||
// more specific alert type, in order to query it for more information.
|
||||
// When you get an alert, you can use ``alert_cast<>`` to attempt to cast the
|
||||
// pointer to a specific alert type, in order to query it for more
|
||||
// information.
|
||||
//
|
||||
// .. note::
|
||||
// ``alert_cast<>`` can only cast to an exact alert type, not a base class
|
||||
template <class T> T* alert_cast(alert* a)
|
||||
{
|
||||
if (a == 0) return 0;
|
||||
|
|
Loading…
Reference in New Issue