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 » Moveable classes with virtual functions/Documentation error
Re: Moveable classes with virtual functions/Documentation error [message #2551 is a reply to message #2527] Mon, 17 April 2006 19:03 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
hans wrote on Sun, 16 April 2006 17:05

Hi,
documentation states in srcdoc/Core/Moveable:

All of the following requirements should be fullfilled for moveable types:
- It does not have any virtual method nor virtual base class.

This is imho incorrect, as U++ itself uses moveable classes with virtual methods, e.g. class Value.

Don't know what's the case with virtual base classes Razz



First of all, no, Value does not have virtual methods (it stores a pointer to heap object with virtual methods, but that is something else).

Second, technically, it is true that there are no technical reasons for "normal" C++ implementation why polymorphic classes should not be moveable (while virtual base classes are not quite often AFAIK).

However, whole Moveable concept is walking on the thin ice. In practice, you really need just concrete types to be moveable; therefore virtual methods are not required. By excluding them, we might be makeing that ice little bit less thin, makeing "moveable" types closer to PODs, with no real disadvantage.

Mirek
 
Read Message
Read Message
Read Message
Previous Topic: Value class suggestion [FEATURE REQUEST]
Next Topic: NFormat should check if args were left
Goto Forum:
  


Current Time: Mon Aug 25 11:47:54 CEST 2025

Total time taken to generate the page: 0.05806 seconds