Make some parallel mode algorithms usable in constexpr contexts
commite12097eda087e492ec22adaaf368cc63c3284c4e
authorJonathan Wakely <jwakely@redhat.com>
Tue, 1 Oct 2019 21:02:22 +0000 (1 22:02 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 1 Oct 2019 21:02:22 +0000 (1 22:02 +0100)
tree06f33c5fc83ccb572738cc68fbf24923facd7767
parent61e619b4fd1252d0fee7f4bfc821824031c52dc5
Make some parallel mode algorithms usable in constexpr contexts

This makes the __parallel::equal and __parallel:lexicographical_compare
algorithms usable in constant expressions, by dispatching to the
sequential algorithm when calling during constant evaluation.

* include/parallel/algobase.h (equal, lexicographical_compare): Add
_GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
constant evaluated.
* include/parallel/algorithmfwd.h (equal, lexicographical_compare):
Add _GLIBCXX20_CONSTEXPR.

From-SVN: r276431
libstdc++-v3/ChangeLog
libstdc++-v3/include/parallel/algobase.h
libstdc++-v3/include/parallel/algorithmfwd.h