summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/function.objects/arithmetic.operations/minus.pass.cpp
blob: f777b2397eae0836a10882f8e2a682d98ba26a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <functional>

// minus

#include <functional>
#include <type_traits>
#include <cassert>

int main()
{
    typedef std::minus<int> F;
    const F f = F();
    static_assert((std::is_base_of<std::binary_function<int, int, int>, F>::value), "");
    assert(f(3, 2) == 1);
}
OpenPOWER on IntegriCloud