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 » Developing U++ » U++ Developers corner » Refactoring Moveable
Re: Refactoring Moveable [message #61384 is a reply to message #61383] Sat, 04 January 2025 09:05 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
Moving static_assert here

template <class T>
inline typename std::enable_if_t<!is_trivially_relocatable<T>> Relocate(T *dst, T *src)
{
	static_assert(is_upp_guest<T>);
	new(dst) T(pick(*src));
	Destruct(src);
}


instead of destructor makes a lot of sense and perhaps adds a bit of self-explanation to the error, but there is still that small disadvantage that it only gets displayed when building, not while editing. Is that acceptable drawback?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dynamic skin changes...
Next Topic: Broken compilation
Goto Forum:
  


Current Time: Tue Aug 12 19:32:38 CEST 2025

Total time taken to generate the page: 0.05201 seconds