libstdc++: Only use std::compare_three_way when concepts are supported
authorJonathan Wakely <jwakely@redhat.com>
Fri, 3 Jan 2020 14:44:39 +0000 (14:44 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 3 Jan 2020 14:44:39 +0000 (14:44 +0000)
commitb4e7013794972ddfcaf042a775b06c94d20ba96b
tree30bf0362ba8b6901f8764bce13b406f15f96fec4
parent48182bd670dab4d0ced7f5f2d9fce6cb589dcfbb
libstdc++: Only use std::compare_three_way when concepts are supported

Clang now supports three-way comparisons. That causes both overloads of
std::lexicographical_compare_three_way to be defined, but the second one
uses std::compare_three_way which depends on concepts. Clang does not
yet support concepts, so the second overload should also depend on
__cpp_lib_concepts.

* include/bits/stl_algobase.h (lexicographical_compare_three_way):
Only define four-argument overload when __cpp_lib_concepts is defined.

From-SVN: r279861
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algobase.h