|
Boost Users : |
Subject: [Boost-users] Boost.Operators on a POD class
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2011-07-08 13:59:39
Hello,
A simplified example of what I am trying to accomplish follows:
// needs to be a POD
struct Point
{
double x, y;
// some functions...
};
Now I would like Point to be additive, and multiplicative by double, so
normally I'd write:
struct Point : additive1< Point, multiplicative2< Point, double > >
{
// supply the needed operators, and let Boost.Operators do the rest
};
But Point needs to be POD, and inheritance kills POD-ness. So I'm wondering,
can Boost help me here?
Regards,
Kris
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