# Implicit Capture of 'This' via '\[=]' is Deprecated

### Error <a href="#error" id="error"></a>

```
Error C4855 implicit capture of 'this' via '[=]' is deprecated in '/std:c++20'
```

### Cause <a href="#cause" id="cause"></a>

Lambdas change slighlty with the upgrade to c++20, which gets implemented in 5.3. This error happens when upgrading something from 5.2 to 5.3.

### Fix <a href="#fix" id="fix"></a>

In 5.2, a lambda is defined like this:

```cpp
auto TracePositive = [=]() -> FHitResult {};
```

But in 5.3, it needs to become this:

```cpp
auto TracePositive = [=, this]() -> FHitResult {};
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oserosuite.com/technical-notes/unreal-engine-notes/compile-errors/implicit-capture-of-this-via-is-deprecated.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
