|
Boost : |
From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2000-12-22 11:25:18
Howard Hinnant wrote:
> Although I find your suggested implementation of add_reference elegant
> (and even prefer it for asthetic reasons), I'm failing to see what is
> wrong with the current implementation:
>
> template <typename T> struct add_reference{ typedef T& type; };
> template <typename T> struct add_reference<T&>{ typedef T& type; };
Sorry for being unclear, but I was talking about
"boost/detail/ob_type_traits.hpp" header (which is included in case if
BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION macro is defined), not the
"boost/detail/type_traits.hpp" one, so actually my version is a workaround
for defective compilers like MSVC (assuming that 'is_reference' and
'is_pointer' were somehow made to work on such compilers, which is kind of
true :).
--Aleksey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk