summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
blob: 3370a2fe9d69b1dcb8db62bfa6399b3887390355 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//===----------------------------------------------------------------------===//
//
//                     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>

// See https://llvm.org/bugs/show_bug.cgi?id=20002

#include <functional>
#include <type_traits>

using Fn = std::function<void()>;
struct S : Fn { using function::function; };

int main() {
    S f1( Fn{} );
    S f2(std::allocator_arg, std::allocator<void>{}, Fn{});
}
OpenPOWER on IntegriCloud