Boost logo

Boost Users :

From: Terje Slettebų (tslettebo_at_[hidden])
Date: 2003-06-21 04:06:04


>From: "Terje Slettebų" <tslettebo_at_[hidden]>

> >From: "Howard Hinnant" <yg-boost-users_at_[hidden]>
>
> > Might
> > be nice if the docs demonstrate its use with member template
> > constructors (as opposed to just namespace scope functions).
>
> And conversion functions, perhaps:

Granted, this doesn't appear use SFINAE, though, so maybe leave it out. On
the other hand, does constructors? I get the same kind of error message for
both constructors and conversion operators, on both Intel C++ and g++:

template<class T>
class test
{
public:
  test(const T &,
    typename enable_if<
      is_arithmetic<T>::value,
      T
>::type * = 0) {}
};

test a(1); // Ok

test b(0 (int *) 0); // error: class "enable_if<false, int *>" has no member
"type"

Regards,

Terje


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net