Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Curious problem wth Vector
Curious problem wth Vector [message #49641] Tue, 20 March 2018 13:17 Go to previous message
koldo is currently offline  koldo
Messages: 3362
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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to convert unicode to String
Next Topic: DST issue in Time()
Goto Forum:
  


Current Time: Tue May 21 14:07:47 CEST 2024

Total time taken to generate the page: 0.01538 seconds