Overview
Features
Download
Documentation
Community
Add-Ons & Services

Move semantics for Any

A general discussion forum.

Move semantics for Any

Postby bogdan » 24 Mar 2012, 23:45

I apologize in advance if this issue has been raised before, but I couldn't find any reference to it in the forums.

Shouldn't classes like Any and DynamicAny have move constructors and move assignment operators, now that (as far as I know) move semantics are pretty well supported by the major compilers?

Something along the lines of:
Code: Select all
Any(Any&& other) :
    _content(0)
{
    swap(other);
}


The only problems I can think of regarding this code would be:
-it would obviously need to be enclosed in #ifdefs to select the compilers;
-it could cause heap corruptions if an Any were passed by value across DLL boundaries on Windows, but that's true in the current implementation of the copy constructor as well, so it wouldn't be a new problem.


A more general question would be: what are the plans regarding support for C++11 features in POCO? Again, sorry if this has been discussed before.

Cheers.
bogdan
 
Posts: 2
Joined: 24 Mar 2012, 21:30

Re: Move semantics for Any

Postby alex » 02 Apr 2012, 04:42

AFAIK, there is no C++11 code in poco yet. I'd say, when it starts, it will be a major overhaul (e.g. replacement of Poco smart pointers with standard ones, threading, hash map, regex etc). If we get enough manpower, we also have a good shot at Poco becoming part of the standard itself:

viewtopic.php?f=11&t=5277

If you are interested in helping, join the effort.
alex
 
Posts: 1115
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Move semantics for Any

Postby bogdan » 11 Apr 2012, 11:06

alex wrote:AFAIK, there is no C++11 code in poco yet. I'd say, when it starts, it will be a major overhaul (e.g. replacement of Poco smart pointers with standard ones, threading, hash map, regex etc). If we get enough manpower, we also have a good shot at Poco becoming part of the standard itself:

viewtopic.php?f=11&t=5277

If you are interested in helping, join the effort.


I would very much like to see that happening - both the overhaul and parts of Poco making it into the standard library; even if the latter doesn't happen, the former will definitely be valuable in itself.

I can't make any guarantees in terms of available time, and there are lots of things I still need to learn about Poco before becoming an effective contributor, but, when this effort starts, I'd like to help where I can.
bogdan
 
Posts: 2
Joined: 24 Mar 2012, 21:30


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron