|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-09-26 18:11:16
on Mon Sep 24 2007, "chun ping wang" <cablepuff-AT-gmail.com> wrote:
> the problem occurs if i pass a primtive type into T. If i actually have
>
> class X : boost::operators<X>
> {
> // ...
> };
>
> and than using X as a template parameter it works.
>
> However it doesn't seem to accept primitive type because of the following reasons...
> error C2803: 'operator --' must have at least one formal parameter of class type
operators is not supposed to be used that way. The only right way to
use operators<X> is to have X be a class derived from operators<X>.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
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