Boost logo

Boost :

Subject: Re: [boost] [core] Determining interest for two new classes: readonlyand newtype
From: Peter Dimov (lists_at_[hidden])
Date: 2015-08-16 14:25:30


Sam Kellett wrote:
> Hey, I have two classes I've developed that have been used in my own
> projects that I think could have a place in Boost. They are outlined
> below.
>
> readonly<T>:
>
> This is a wrapper class for a type to replace a const-type field in a
> movable class. It has const access to the type so can't modify except for
> the move constructor and move assignment operator.

...

> newtype<N, T>
>
> This is shamelessly ripped off from Haskell and provides strongly-typed
> typedefs to C++.

These look interesting and useful. I do not think they belong in [core]
though, which is for components that are used throughout Boost. [utility]
seems a better place.


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