From b7332b04df5d50c92640c74cfeb138ecb7e3f7ae Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 20 Aug 2019 18:01:01 +0000 Subject: Remove upstream files and directories from vendor/libc++/dist that we do not use. This saves on repository space, and reduces the number of tree conflicts when merging. --- .../func.bind.bind/invoke_function_object.pass.cpp | 51 ---------------------- 1 file changed, 51 deletions(-) delete mode 100644 test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp (limited to 'test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp') diff --git a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp b/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp deleted file mode 100644 index a9a38b83cb4e..000000000000 --- a/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_function_object.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// - -// template -// unspecified bind(Fn, Types...); -// template -// unspecified bind(Fn, Types...); - -// https://bugs.llvm.org/show_bug.cgi?id=22003 - -#include - -struct DummyUnaryFunction -{ - template - int operator()(S const &) const { return 0; } -}; - -struct BadUnaryFunction -{ - template - constexpr int operator()(S const &) const - { - // Trigger a compile error if this function is instantiated. - // The constexpr is needed so that it is instantiated while checking - // __invoke_of. - static_assert(!std::is_same::value, "Shit"); - return 0; - } -}; - -int main() -{ - // Check that BadUnaryFunction::operator()(S const &) is not - // instantiated when checking if BadUnaryFunction is a nested bind - // expression during b(0). See PR22003. - auto b = std::bind(DummyUnaryFunction(), BadUnaryFunction()); - b(0); - auto b2 = std::bind(DummyUnaryFunction(), BadUnaryFunction()); - b2(0); -} -- cgit v1.3