หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
expected '->' before the return type
Remarks
You must provide -> before the return type of a lambda expression.
To correct this error
- Provide
->before the return type.
Example
The following example generates C3484:
// C3484a.cpp
int main()
{
return []() . int { return 42; }(); // C3484
}
The following example resolves C3484 by providing -> before the return type of the lambda expression:
// C3484b.cpp
int main()
{
return []() -> int { return 42; }();
}