On 2025/01/27 21:15, Sérgio Basto via devel wrote:
On Mon, 2025-01-27 at 20:52 +0100, Cristian Le via devel wrote:
According to the CPP standard, <version> and the deprecation was
added in CPP20 [1] so would be best not to patch that part
unconditionally in the gtest source. Maybe you could patch in a
pragma to disable the warning instead?
Another option could be to drop the CPP standard check altogether and
rely on the availability of __has_include.
[1]:https://en.cppreference.com/w/cpp/header/ciso646
but "#include <version>" (the replacement) already exist in CPP17 ,
isn't it ?
According to the standard, no it shouldn't be, but compilers often
provide the features way before the standard [1]. Best example of this
`#warning` or `[[deprecated]]` in C23 [2].
On the other hand, the inclusion of <version> with deprecation of
<cisco646> according to the documentation around it seems pretty
straightforward, as in, there is no realistic reason not to include
<version> if you already have it. The compiler should handle exposing
the appropriate headers depending on the C++ standard option that it was
provided. That's why getting rid of the CPP standard check there
altogether would also make sense to me.
[1]: https://en.cppreference.com/w/cpp/compiler_support/20
[2]: https://en.cppreference.com/w/c/compiler_support/23
--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue