AlisdairM wrote:
Johan Råde wrote:
If I modify the array class by adding a non-templatized assignment operator, as follows, then the code does compile.
---------------------------------------------------------
namespace boost { template
class array { ... array & operator=(const array & rhs) { std::copy(rhs.begin(), rhs.end(), begin()); return *this; } ... }; } ----------------------------------------------------------
So I propose that this assignment operator is added, as a VC++ 7.1 bug workaround, to the array class.
The problem with that workaround is that the array template would no longer produce aggregate types, and we would lose the ability to use brace initialization:
I have contacted Nicolai Josuttis concerning this, and he told me he is not maintaining the array library anymore.
Yes, I have taken on the maintenance now. Thanks for the report, although I don't have an instant solution :¬(
Alisdair, Let's finish up this issue. Are you going to add the workaround that I proposed? I believe the discussion in this thread led to the conclusion that my workaround is OK. Aggregates can not have user defined constructors, but they can have user defined assignment operators. --Johan Råde