1*3df094d3SArthur O'Dwyer //===----------------------------------------------------------------------===//
2*3df094d3SArthur O'Dwyer //
3*3df094d3SArthur O'Dwyer // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*3df094d3SArthur O'Dwyer // See https://llvm.org/LICENSE.txt for license information.
5*3df094d3SArthur O'Dwyer // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*3df094d3SArthur O'Dwyer //
7*3df094d3SArthur O'Dwyer //===----------------------------------------------------------------------===//
8*3df094d3SArthur O'Dwyer 
9*3df094d3SArthur O'Dwyer // UNSUPPORTED: c++03, c++11, c++14, c++17
10*3df094d3SArthur O'Dwyer 
11*3df094d3SArthur O'Dwyer // <functional>
12*3df094d3SArthur O'Dwyer 
13*3df094d3SArthur O'Dwyer // Test that std::compare_three_way is defined in <functional>,
14*3df094d3SArthur O'Dwyer // not only in <compare>.
15*3df094d3SArthur O'Dwyer 
16*3df094d3SArthur O'Dwyer #include <functional>
17*3df094d3SArthur O'Dwyer #include <cassert>
18*3df094d3SArthur O'Dwyer 
main(int,char **)19*3df094d3SArthur O'Dwyer int main(int, char**)
20*3df094d3SArthur O'Dwyer {
21*3df094d3SArthur O'Dwyer     assert(std::compare_three_way()(1, 2) < 0);
22*3df094d3SArthur O'Dwyer     assert(std::compare_three_way()(1, 1) == 0);
23*3df094d3SArthur O'Dwyer     assert(std::compare_three_way()(2, 1) > 0);
24*3df094d3SArthur O'Dwyer 
25*3df094d3SArthur O'Dwyer     return 0;
26*3df094d3SArthur O'Dwyer }
27