U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Sat Jun 20 20:18:04 GMT+2 2026

Total time taken to generate the page: 0.01060 seconds