ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.06k stars 437 forks source link

Currently not possible to compile range-v3 with -fno-rtti flag set #1764

Open yury-fedorov opened 1 year ago

yury-fedorov commented 1 year ago

Adding -fno-rtti flag leads to fail the build with the following errors:

range-v3-src/include/range/v3/view/anyview.hpp:129:24: error: use of typeid requires -frtti , info(&typeid(rtti_tag))

range-v3-src/include/range/v3/view/any_view.hpp:135:58: error: use of typeid requires -frtti RANGESASSERT(obj && info && *info == typeid(rtti_tag)); ^ range-v3-src/include/range/v3/detail/config.hpp:63:23: note: expanded from macro 'RANGES_ASSERT'

define RANGES_ASSERT assert

frederick-vs-ja commented 1 year ago

I think when (static) RTTI is disabled, any_view shouldn't be provided.

yury-fedorov commented 1 year ago

Sounds reasonable also to me. This feature is not part of any of C++ standard, as I understand.

On Mon, Jan 30, 2023 at 6:03 PM A. Jiang @.***> wrote:

I think when (static) RTTI is disabled, any_view shouldn't be provided.

— Reply to this email directly, view it on GitHub https://github.com/ericniebler/range-v3/issues/1764#issuecomment-1408988819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKHLNOMDTGOH66G7KBEZWLWU7X4JANCNFSM6AAAAAAUDHTCDA . You are receiving this because you authored the thread.Message ID: @.***>