1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // UNSUPPORTED: c++03, c++11, c++14
10
11 // <functional>
12
13 // default searcher
14
15 // Make sure that the implicitly-generated CTAD works.
16
17 #include <functional>
18
19 #include "test_macros.h"
20
main(int,char **)21 int main(int, char**) {
22 {
23 char const* str = "hello";
24 std::default_searcher searcher(str, str + 3);
25 ASSERT_SAME_TYPE(decltype(searcher), std::default_searcher<char const*, std::equal_to<>>);
26 }
27 {
28 char const* str = "hello";
29 std::default_searcher searcher(str, str + 3, std::not_equal_to<>());
30 ASSERT_SAME_TYPE(decltype(searcher), std::default_searcher<char const*, std::not_equal_to<>>);
31 }
32
33 return 0;
34 }
35