Conversion operator for boost any

1 Dec
2010
1 Dec
'10
7:58 a.m.
Hello, I found adding the following conversion operator to Boost.Any was very helpful in some cases: (specially when using macros inside functions) template <typename ValueType> operator ValueType() { return any_cast<ValueType>(*this); }
5305
Age (days ago)
5305
Last active (days ago)
0 comments
1 participants
participants (1)
-
Leonid Frenkel