Boost logo

Boost Users :

From: Christian Henning (chhenning_at_[hidden])
Date: 2006-02-16 11:46:49


You can only have static members defined in the class declaration, e.g.

class register
{
   void set_mask() { reg |= mask; }

private:
  uint64_t reg;
  const static uint64_t mask = 0x12345678;
};

This, of course, only makes sense when the mask doesn't change from
every instantiation of register (being non-static).

Christian


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