Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-09-15 12:37:45


Howard Hinnant wrote:
> Like Daniel, I recommend the enable_if pattern here, but I would do it
> like:
>
> struct test_t
> {
> template <typename T>
> test_t(T&, typename enable_if<!is_const<T>::value>::type* = 0)
> {
> }
>
> template <typename T>
> test_t(T&, typename enable_if<is_const<T>::value>::type* = 0)
> {
> }
> }

Unfortunately, this prevents construction from temporaries.

Eric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk