xref: /llvm-project/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp (revision d5b53598026c315234c4b81909d5d88d42fc01d6)
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <functional>
11 
12 // See https://llvm.org/bugs/show_bug.cgi?id=20002
13 
14 #include <functional>
15 #include <type_traits>
16 
17 using Fn = std::function<void()>;
18 struct S : Fn { using function::function; };
19 
20 int main() {
21     S f1( Fn{} );
22     S f2(std::allocator_arg, std::allocator<void>{}, Fn{});
23 }