воскресенье, 11 декабря 2011 г.

Type Traits. Functions

Got a sneak peek on boost::function_traits implementation. One more partial template specialization trick:
Specialized member_function struct declarations splits original "typename T" into three separate template arguments allowing us to decompose member function reference into return type, object type and argument type. boost::function_traits implementation is a bit more generalized, supports for multiple arguments, but the code above can be quite useful too though.

Комментариев нет: