Boost logo

Boost Users :

Subject: Re: [Boost-users] true typedef (true_typedef) implemented in boost?
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-07-17 12:26:19


Stefan Strasser wrote:
> Zitat von Ryan Gallagher <ryan.gallagher_at_[hidden]>:
>
>> alfC <alfredo.correa <at> gmail.com> writes:
>>
>>> I stumbled upon the concept of true typedef, or strong typedef in
>>> opposition to usual typedef which are weak.
>> [snip]
>>> I was wondering if this is already implemented in some corner of
>>> Boost, or as a detail implementation.
>>
>> There's a detail impl in serialization, I believe.
>> Search for BOOST_STRONG_TYPEDEF
>
> there is more interesting stuff in Boost.Seriailzation that could be
> part of boost in general.
> - especially seriailzation::singleton, because it requires linking
> to the serialization library even though you don't serialize anything.

Hmmm - the whole purpose of boost::serialization::singleton was to be
header only and require no linking against any other library. Did
I get this wrong?

> - ptr_serialization_support in
> http://www.boost.org/doc/libs/1_41_0/boost/serialization/export.hpp
> which forces instantiation of a function.

>this apparently cannot be
> implemented platform independently, so Boost.Config might be the right
> library for it?

These are related to boost::serialization::extended_type_info which extends
the standard type_info facility in accordance with the needs of boost
serialization. This results (sort of as a side effect) support for runtime
plugin - sort of like a poor man's C++ COM.

> - smart_cast

yep

and my personal favorite - dataflow iterators. But I suspect this
functionality
has probably been covered by Ranges - I'm don't know this, I'm just deducing
that from the name.

Oh - codecvt_utf8. The whole codecvt thing is ripe for a library. I
realise
that some proposals have been made in this area. I haven't studied them
in detail so I don't want to be critical. But, my experience with using the
codecvt facility in the serialization library leads me to suspect that it is
better than is generally appreciated. In fact, the whole C++ streams
is better than it first appears. The problems is it's sort of obtuse. Some
libraries to help support it would help explain and promote this. I'm
thinking
of things like composable codecvt facets and alternative filebuf
implementations.
I've always felt the boost streams library got a little off track by not
leverage
enough on the standard library - a missed opportunity in my opinion.

Robert Ramey


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