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 // <functional>
10 
11 // mem_fun1_t
12 // Removed in c++17
13 
14 // UNSUPPORTED: c++03, c++11, c++14
15 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
16 
17 #include <functional>
18 #include <type_traits>
19 #include <cassert>
20 
21 #include "test_macros.h"
22 
23 struct A
24 {
a1A25     char a1() {return 5;}
a2A26     short a2(int i) {return short(i+1);}
a3A27     int a3() const {return 1;}
a4A28     double a4(unsigned i) const {return i-1;}
29 };
30 
main(int,char **)31 int main(int, char**)
32 {
33     typedef std::mem_fun1_t<short, A, int> F;
34 
35   return 0;
36 }
37