In my basic c++ book, there is no class declaration like below. the strange code for me is ...
boost::signals2::signal<bool (const std::string& message,
const std::string& caption, unsigned int style),
boost::signals2::last_value<bool> > ThreadSafeMessageBox;
the things in round brackets (const std:::string
...) are not a typename but instance. How could it be possible? The code above compiles fine.
p.s. template class (signal
) code is
template<typename Signature,
typename Combiner = optional_last_value<typename boost::function_traits<Signature>::result_type>,
typename Group = int,
typename GroupCompare = std::less<Group>,
typename SlotFunction = function<Signature>,
typename ExtendedSlotFunction = typename detail::extended_signature<function_traits<Signature>::arity, Signature>::function_type,
typename Mutex = mutex >
class signal: public detail::signalN<function_traits<Signature>::arity,
Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::type
{ /*...*};