brintos

brintos / llvm-project-archived public Read only

0
0
Text · 984 B · 6334ed1 Raw
35 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410 11// <functional>12 13// default searcher14 15// Make sure that the implicitly-generated CTAD works.16 17#include <functional>18 19#include "test_macros.h"20 21int 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