$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Maximilian Riemensberger (riemaxi_at_[hidden])
Date: 2022-06-02 12:00:07
On 6/2/22 13:30, Julien Blanc wrote:
> Le jeudi 02 juin 2022 à 11:00 +0200, Maximilian Riemensberger a écrit :
>> On 6/2/22 07:57, Julien Blanc via Boost wrote:
>>
>> Is there a particular reason to require c++17? I guess some
>> std::array features that got added? I would assume that it should be
>> possible to make it compile under C++14 (maybe using some boost
>> array) since most constexpr things should already be available there.
>
> The first reason it requires C++17 is because this is what i am
> targetting at the moment. However, making it C++14-compliant would
> require a few changes:
>
> * the library use template auto syntax in several places, this allows
> writing indexed_array<float, interval<1, 10>>. In C++14 one would need
> to write indexed_array<float, interval<int, 1, 10>>, or resort to
> macros.
> * it makes use of std::is_invokable to correctly disable the default
> aggregate constructor if given a safe_arg initializer list. This can be
> worked around (iirc is_invokable can be emulated in C++14)
> * it also makes use of std::apply for multi-dimensional indexing.
> Likewise, this can be emulated in C++14.
> * there are probably a few others that i'm missing. In short: it can be
> done, but sticking to C++17 avoided reimplementing several now-standard
> library features.
I see. The first one is definitely a language limitation. But I guess it's mostly an inconvenience to the users of the library if they are on C++14. The other ones as far as I can see have counterparts in boost that would work in C++14 as well. So I guess it could be done without too much hassle if there is a need and the library would be included in boost. Either way, it's very useful regardless of the std version details.
Best,
Max