|
Boost Users : |
Subject: [Boost-users] [Proto] Storing an Expression Template as a Data Member
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2011-01-06 08:58:19
Dear all,
Is there any way I can have classes with data members of type (proto) expression templates? Here is where I get stuck:
template<typename T>
class MyClass
{
...
T expression_;
};
What type should T be?
If you're wondering why on earth I might need that, here is an explanation: Instances of MyClass need to store the lazy calculation they will be performing later on when enough initialisation data is available. Each instance of MyClass has its own FORMULATION for the lazy calculation in terms of the initialisation data. They need to be fed with these formulations and I thought (proto) expression templates will perhaps do the job. But, then, I don't know how to store these formulations until it's time for them to perform...
TIA,
--Hossein
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