brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1000 B · bcc4a04 Raw
34 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// <functional>10// REQUIRES: c++03 || c++11 || c++1411// unary_function was removed in C++1712 13// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS14 15// template <class Arg, class Result>16// struct unary_function17// {18//     typedef Arg    argument_type;19//     typedef Result result_type;20// };21 22#include <functional>23#include <type_traits>24 25#include "test_macros.h"26 27int main(int, char**)28{29    static_assert((std::is_same<std::unary_function<unsigned, char>::argument_type, unsigned>::value), "");30    static_assert((std::is_same<std::unary_function<unsigned, char>::result_type, char>::value), "");31 32  return 0;33}34