M
Michael Hopkins
Hi all
A couple of questions that are influencing the design of some classes.
1) Why were the std:: library containers not given virtual destructors - is
this a feature or an oversight? If the latter, I wonder if it would be
something that could be changed easily in the upcoming standard without
breaking current code.
We would like to derive publicly from them in a couple of cases and now have
to be more disciplined than we should need to be about how we use those
types.
2) Is there any way of declaring e.g. two valarray<double> so that they are
guaranteed to be contiguous in memory? i.e.
class V {
std::valarray<double> v1, v2;
}
TIA and please CC replies to this address
Michael
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/ _/_/_/ Hopkins Research Ltd
_/ _/ _/ _/
_/_/_/_/ _/_/_/ http://www.hopkins-research.com/
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
A couple of questions that are influencing the design of some classes.
1) Why were the std:: library containers not given virtual destructors - is
this a feature or an oversight? If the latter, I wonder if it would be
something that could be changed easily in the upcoming standard without
breaking current code.
We would like to derive publicly from them in a couple of cases and now have
to be more disciplined than we should need to be about how we use those
types.
2) Is there any way of declaring e.g. two valarray<double> so that they are
guaranteed to be contiguous in memory? i.e.
class V {
std::valarray<double> v1, v2;
}
TIA and please CC replies to this address
Michael
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/ _/_/_/ Hopkins Research Ltd
_/ _/ _/ _/
_/_/_/_/ _/_/_/ http://www.hopkins-research.com/
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/