Home » U++ Library support » U++ Core » Curious problem wth Vector
Curious problem wth Vector [message #49641] |
Tue, 20 March 2018 13:17  |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
I have found a weird problem. Declaring this class:
struct MyData : public Moveable<MyData> {
MyData() {}
double T;
};
And declaring Vector<MyData> data; produces an error message in MSC15 and 17 (not in MinGW):
error C2523: 'Unit::~T': destructor tag mismatch
The code when the error is found is:
template <class T>
inline void Destroy(T *t, const T *end)
{
while(t != end) {
t->T::~T(); // HERE
t++;
}
}
In some way, the name of variable double "T" clashes with template name "T"...
Best regards
Iñaki
[Updated on: Tue, 20 March 2018 13:18] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:03:18 CEST 2025
Total time taken to generate the page: 0.00888 seconds
|