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 » Community » U++ community news and announcements » By dropping MSC71 support, we can now activate generic pointers templates
By dropping MSC71 support, we can now activate generic pointers templates [message #36214] Sat, 12 May 2012 15:05 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
There are two of them:

template<class T> unsigned GetHashValue(T *)

and

template<class T> String AsString(T *)

means it is now not required to provide GetHashValue for pointers and pointers can be e.g. DUMPed directly.
Re: By dropping MSC71 support, we can now activate generic pointers templates [message #36364 is a reply to message #36214] Tue, 22 May 2012 18:34 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Hi mirek

i ran into a dumb problem since that..

this used to work (Python export of a class, say 'Size')
		.def("__str__", &::AsString<Size>)


now, TDMGCC451 still compiles it, MSC9 doesnt.
I could wrap this into an explicit differently named function, but this is a general problem.. how to get a pointer to that function?
casting to an explicit version doesnt work as it seems
		.def("__str__", (String (*)(const Size&))&AsString<Size>)

any hint?

[Updated on: Tue, 22 May 2012 18:35]

Report message to a moderator

Re: By dropping MSC71 support, we can now activate generic pointers templates [message #36369 is a reply to message #36364] Wed, 23 May 2012 08:14 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 22 May 2012 12:34

Hi mirek

i ran into a dumb problem since that..

this used to work (Python export of a class, say 'Size')
		.def("__str__", &::AsString<Size>)


now, TDMGCC451 still compiles it, MSC9 doesnt.
I could wrap this into an explicit differently named function, but this is a general problem.. how to get a pointer to that function?
casting to an explicit version doesnt work as it seems
		.def("__str__", (String (*)(const Size&))&AsString<Size>)

any hint?


This is really sad. IMO it is not 'our' bug....

What about adding AsStringConcrete template (same definition as AsString), which is NOT defined for pointers?

Mirek

[Updated on: Wed, 23 May 2012 08:14]

Report message to a moderator

Previous Topic: Ide: Insert clipboard text as C string, convert text to C string
Next Topic: HttpCookie, improved Cookie support
Goto Forum:
  


Current Time: Fri Apr 19 03:25:05 CEST 2024

Total time taken to generate the page: 0.03130 seconds