diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-07-20 06:46:22 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-07-20 06:46:22 +0000 |
commit | b2e7cc6994a6937fd04a2b81e6f21565ac5f1eb4 (patch) | |
tree | 0b041fb0516945086173341ac6a0db5baa7fd89a /libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp | |
parent | 85acffa676147ffd982a0fde77795b043ecee2e6 (diff) | |
download | bcm5719-llvm-b2e7cc6994a6937fd04a2b81e6f21565ac5f1eb4.tar.gz bcm5719-llvm-b2e7cc6994a6937fd04a2b81e6f21565ac5f1eb4.zip |
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.
llvm-svn: 276093
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp')
-rw-r--r-- | libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp index 3370a2fe9d6..bc8ab873b0a 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp @@ -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); +} |