Boost logo

Boost :

From: Edward Diener (eldiener_at_[hidden])
Date: 2020-10-03 14:42:01


On 10/3/2020 6:25 AM, Gero Peterhoff via Boost wrote:
> Am 03.10.20 um 11:34 schrieb Andrey Semashev via Boost:
>> On 10/3/20 12:30 PM, Andrey Semashev wrote:
>>> On 10/3/20 11:53 AM, Gero Peterhoff via Boost wrote:
>>>> Am 12.09.20 um 16:15 schrieb Andrey Semashev via Boost:
>>>>> Given that Boost.TypeTraits are not equivalent in some instances to std type traits, I don't think we're going to remove them any time soon. At least, I would be opposed to such a move.
>>>>>
>>>>> You can opportunistically use std type traits and fallback to Boost.TypeTraits in some simple cases, but that doesn't really make much sense in Boost since that doesn't remove the dependency on Boost.TypeTraits and requires workarounds in cases when the type traits don't match.
>>>>>
>>>>> Also, we normally don't include all-in-one headers like <boost/type_traits.hpp> because that brings way more code than necessary. This is one of the drawbacks of <type_traits> and one of the reasons to use Boost.TypeTraits, actually.
>>>>
>>>> - Is there an overview/documentation which Boost.TypeTraits differ from the standard?
>>>
>>> I haven't seen an overview. But you could read Boost.TypeTraits docs and compare it to the standard to see if there is a difference. Some differences are not documented, I think, like support for 128-bit integers for example.
>>
>> I should add that in some cases Boost.TypeTraits work around bugs in the standard type traits, which is also not documented. For example, std::alignment_of would give incorrect result for 64-bit types on 32-bit targets and boost::alignment_of works as expected.
>>
>
> I think it would make more sense to document this. So not every user has to find out for himself.
>
>>>> - Would it make sense to only keep these different/additional Boost.TypeTraits and remove the standard-compliant ones?
>>>
>>> IMO, no, because there are C++03 libraries and there are no standard type traits in C++03.
>
> Boost should be changed to C++11 and C++03 support removed? https://pdimov.github.io/articles/phasing_out_cxx03.html

Boost seeks to ensure that the many Boost libraries which can still work
at the C++03 level also work at the C++11 on up levels. It would be
foolish to eliminate these libraries if they are still useful to
programmers compiling at the C++11, C++14, c++17, AND c++20 levels just
because they also happen to work at the C++03 level. At the same time
Boost is not supporting the C++03 level any more, and libraries are free
to move from the C++03 level to the C++11 level or higher if they wish.


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