ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[PMX:#] [boost] mojo II
by Andrei Alexandrescu other posts by this author
Oct 21 2002 3:28PM messages near this date
[boost] Re: Boost.Test crashes VC++ 7.0 | [boost] Formal Review: The Spirit Parser Framework
This post is of relevance to those interested in move constructors. I only
post here as an announcement; I suggest is we discuss mojo on
comp.lang.c++.moderated.

The first failure of mojo gave insight into what could be done to eliminate
copying of temporaries.

You can find a complete redesign of mojo and a rewritten article that
describes the new design at http://moderncppdesign.com/mojo. The old design
and article have been saved at http://moderncppdesign.com/mojo/old.
believe
The new design has the following characteristics:

(1) Offers portable 100% elimination of temporary copying if the user
follows some simple rules.

(2) The signature of functions returning objects must be changed to return
mojo::fnresult<T>  when T was previously returned. The body of those
functions needs not to be changed in most cases.

(3) The function parameters must be changed following the "mojo protocol".

(4) Containers can be designed that support straight types, mojoed types,
and special "move-only" types such as owning pointers, expensive-to-copy
handles etc.

(5) Mojo is not 100% transparent; it never was; but the attempt was to make
it as transparent as humanly possible. Your mileage might vary, but overall
the result is fairly satisfactory.

You may want to discuss mojo on comp.lang.c++.moderated.


Andrei

--
All new!  THE C++ Seminar: Oct. 28-30 in Vancouver, WA.
http://www.thecppseminar.com/





_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved