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 » PROPOSAL: SerializeStore helper
PROPOSAL: SerializeStore helper [message #29413] Tue, 19 October 2010 12:05 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
just a short add..

XmlizeStore exists, to be able to handle 'const T& x'
I couldnt find anything similar for Serialize..
here is a solution.

template<class T>
void SerializeStore(Stream& s, const T& x)
{
	ASSERT(s.IsStoring());
	s % const_cast<T&>(x);
}


this makes thing possible like
SerializeStore(s, mymap.GetKey(i));

without the hassle of a const_cast each time..and an ASSERT is there..

any better solution or didnt i think of every pitfall..
 
Read Message
Read Message
Read Message
Previous Topic: no String::Replace() ?
Next Topic: PolyDeepCopyNew: MSC / GCC differ in behaviour
Goto Forum:
  


Current Time: Sat May 04 05:11:42 CEST 2024

Total time taken to generate the page: 0.01887 seconds