Author: ericwf Date: Wed Jul 20 01:46:22 2016 New Revision: 276093 URL: http://llvm.org/viewvc/llvm-project?rev=276093&view=rev Log: Fix inheriting constructor test for std::function.
The test I originally checked in only worked with ToT Clang. This patch updates the test so that it works as far back as 3.5. Modified: libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp Modified: libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp?rev=276093&r1=276092&r2=276093&view=diff ============================================================================== --- libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp (original) +++ libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp Wed Jul 20 01:46:22 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <functional> // See https://llvm.org/bugs/show_bug.cgi?id=20002 @@ -15,9 +17,10 @@ #include <type_traits> using Fn = std::function<void()>; -struct S : Fn { using function::function; }; +struct S : public std::function<void()> { using function::function; }; int main() { - S f1( Fn{} ); - S f2(std::allocator_arg, std::allocator<void>{}, Fn{}); -} \ No newline at end of file + S s( [](){} ); + S f1( s ); + S f2(std::allocator_arg, std::allocator<int>{}, s); +} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits