improve documentation for alert_cast

This commit is contained in:
arvidn 2016-05-22 20:35:04 -04:00
parent b5fc367d17
commit f6b18c7097
1 changed files with 6 additions and 2 deletions

View File

@ -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;