Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-11-17 18:59:33


"Robert Ramey" <ramey_at_[hidden]> writes:

> Daryle Walker wrote:
>> On 11/13/05 2:05 PM, "Robert Ramey" <ramey_at_[hidden]> wrote:
>>
>>> Daryle Walker wrote:
>
>> [1] C and C++ don't have this feature in general, although some wish
>> for it. Other languages do have this. I think Ada is an example.
>
> As an aside, note that the serialization library contains STRONG_TYPE which
> was needed to implement the library. Its good enough for the serialization
> library but probably not up to "industrial strength". May some
> enterprising individual might want to take a look at this with the
> idea of make an "industrial strengh boost version"

There is no way to make such a thing "industrial strength" in today's
C++, for most people's definition of "strong typedef". In fact, the
one in the serialization library isn't anything like a typedef, and
it's nothing like what most people mean when they say "strong
typedef". It's merely a wrapper over an instance of some type that
can be implicitly converted to that instance. A "strong typedef"
wouldn't even necessarily have that implicit conversion -- in fact,
eliminating those implicit conversions is one of the main reason some
people want direct language support for strong typedefs.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net