From f6b18c709794b4d90e5d7b2c4f2a653ec933e95a Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 22 May 2016 20:35:04 -0400 Subject: [PATCH] improve documentation for alert_cast --- include/libtorrent/alert.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/libtorrent/alert.hpp b/include/libtorrent/alert.hpp index ab6cba6cb..06b48eea5 100644 --- a/include/libtorrent/alert.hpp +++ b/include/libtorrent/alert.hpp @@ -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 T* alert_cast(alert* a) { if (a == 0) return 0;