Boost logo

Boost :

Subject: Re: [boost] [Review] Formal Review: Boost.Move - purpose + move enabling macros
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-05-12 06:16:49


On 11/05/2010 8:48, Jeffrey Lee Hellrung, Jr. wrote:

> In my opinion, *the* primary goal of this library is to provide a
> standardized convention by which data structures and algorithms within
> and outside of boost can make use of move semantics in c++03 (there is
> already such a convention in c++0x).

The aim is also to provide a portable syntax between C++0x and C++03
compilers, that's why I consider the macros necessary. I would like to
offer a syntax any novice could easily understand.

I also understand your position when you say:

> This means, for
> example, that, as an author of some class, I am not restricted to
> using the macros provided by this library to enable move emulation,
> or the forwarding functions this library provides, or whatever else,
> if they don't meet my requirements.

but I, as a writer of an algorithm, would like to know how the emulation
works and what should I expect when assigning temporary copyable and
movable classes. If the performance depends on the emulation used by the
author, maybe I can't design the algorithm optimal for both C++0x and C++03.

> I believe an itemization of the
> nitty-gritty requirements that a class must satisfy to be move-aware
> will encourage alternative, more targeted methods to enable move
> emulation while remaining inter-compatible with each other.

As long as they are compatible, there is no problem, but I think having
a C++0x-like syntax for move emulation is positive. Maybe both
approaches should be available, the macro-based one for average users
without forbidding the use of alternative approaches.

Thanks for your comments, best,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk