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 // UNSUPPORTED: c++98, c++03 11 // REQUIRES: c++11 || c++14 12 13 // <functional> 14 15 // See https://bugs.llvm.org/show_bug.cgi?id=20002 16 17 #include <functional> 18 #include <type_traits> 19 20 #include "test_macros.h" 21 22 using Fn = std::function<void()>; 23 struct S : public std::function<void()> { using function::function; }; 24 main()25int main() { 26 S s( [](){} ); 27 S f1( s ); 28 S f2(std::allocator_arg, std::allocator<int>{}, s); 29 } 30