Fix unused parameters and variables

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-12-23 23:37:52 +00:00
parent 17a98d8a92
commit 0e5ebbc77c
120 changed files with 307 additions and 268 deletions

View File

@@ -138,26 +138,26 @@ inline constexpr CallType operator|(CallType LHS, CallType RHS) {
struct ForwardingCallObject {
template <class ...Args>
bool operator()(Args&&... args) & {
bool operator()(Args&&...) & {
set_call<Args&&...>(CT_NonConst | CT_LValue);
return true;
}
template <class ...Args>
bool operator()(Args&&... args) const & {
bool operator()(Args&&...) const & {
set_call<Args&&...>(CT_Const | CT_LValue);
return true;
}
// Don't allow the call operator to be invoked as an rvalue.
template <class ...Args>
bool operator()(Args&&... args) && {
bool operator()(Args&&...) && {
set_call<Args&&...>(CT_NonConst | CT_RValue);
return true;
}
template <class ...Args>
bool operator()(Args&&... args) const && {
bool operator()(Args&&...) const && {
set_call<Args&&...>(CT_Const | CT_RValue);
return true;
}
@@ -526,7 +526,6 @@ void call_operator_forwarding_test()
assert(Fn::check_call<int&&>(CT_Const | CT_RValue));
}
{ // test multi arg
int x = 42;
const double y = 3.14;
std::string s = "abc";
obj(42, std::move(y), s, std::string{"foo"});