Boost logo

Boost :

Subject: Re: [boost] [interest] underlying type library
From: Julian Gonggrijp (j.gonggrijp_at_[hidden])
Date: 2011-08-20 14:06:21


TONGARI wrote:

> Do you have codes? Something that just works may not be guaranteed to
> work...

Very true.

I have a zip archive on dropbox:
http://dl.dropbox.com/u/3512486/underlying.zip (7 kB)

It's all quite immature and it would need rigorous boostification to
eventually become a candidate for a review, but the implementation
works and I believe it to be without errors (whether conceptual or
practical).

My own template metaprogramming solution for the underlying_type might
be replaced by boost::aligned_storage. Thanks to Mathias Gaunard for
bringing it to my attention.

>> It probably depends on what you mean by 'move semantics' and what you
>> mean by 'implement'. What I'm sure of, is that my library can
>> (unintrusively) simulate move constructors, move destructors and the
>> returning of rvalue references from functions. Of course, it doesn't
>> use *only* bitwise copies for that purpose and the type involved needs
>> to be default-constructible.
>>
>
> What type needs to be default-constructible?
> Something like underlying_type_traits<T>::underlying_type or T itself?

T itself.


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