Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transformations] Fix warning: implicit capture of ‘this’ via ‘[=]’ #23169

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

CuriousPanCake
Copy link
Contributor

@CuriousPanCake CuriousPanCake commented Feb 29, 2024

[Transformations] Fix warning: implicit capture of ‘this’ via ‘[=]’

Details:
Implicit capture of 'this' for lambdas is deprecated since C++20. Fix it by adding a special macro OV_CAPTURE_CPY_AND_THIS which expands into '=' or '=, this' depending on a C++ standard used.

Note:
Although C++20 identifier is 202002L, some compilers supporting C++20, or its drafts like C++2a, producing the warning, are using 201402L value. Also, MSVC requires a special check due to the __cplusplus value compatibility issues.

Ticket: CVS-132688

Signed-off-by: Andrii Staikov [email protected]

@github-actions github-actions bot added the category: transformations OpenVINO Runtime library - Transformations label Feb 29, 2024
@CuriousPanCake CuriousPanCake marked this pull request as ready for review February 29, 2024 14:51
@CuriousPanCake CuriousPanCake requested a review from a team as a code owner February 29, 2024 14:51
@CuriousPanCake CuriousPanCake added category: Core OpenVINO Core (aka ngraph) category: CPU OpenVINO CPU plugin category: LP transformations OpenVINO Low Precision transformations labels Feb 29, 2024
@ilya-lavrenov ilya-lavrenov added this to the 2024.1 milestone Mar 1, 2024
@github-actions github-actions bot removed category: Core OpenVINO Core (aka ngraph) category: CPU OpenVINO CPU plugin category: LP transformations OpenVINO Low Precision transformations labels Mar 1, 2024
@CuriousPanCake CuriousPanCake force-pushed the CVS_132688 branch 2 times, most recently from d057fb8 to be2d7e6 Compare March 1, 2024 09:11
@CuriousPanCake
Copy link
Contributor Author

Changed OV_CAPTURE_ALL_VAL to OV_CAPTURE_CPY_AND_THIS. Suggestions for a better name are still welcome.

@CuriousPanCake CuriousPanCake force-pushed the CVS_132688 branch 4 times, most recently from 68f361b to 105e235 Compare March 4, 2024 13:08
Details:
Implicit capture of 'this' for lambdas is deprecated since C++20.
Fix it by adding a special macro OV_CAPTURE_CPY_AND_THIS which
expands into '=' or '=, this' depending on a C++ standard used.

Note:
Although C++20 identifier is 202002L, some compilers
supporting C++20, or its drafts like C++2a, producing
the warning, are using 201402L value.
Also, MSVC requires a special check due to the
__cplusplus value compatibility issues.

Ticket: CVS-132688

Signed-off-by: Andrii Staikov [email protected]
@itikhono itikhono enabled auto-merge March 5, 2024 14:53
@itikhono itikhono added this pull request to the merge queue Mar 5, 2024
Merged via the queue into openvinotoolkit:master with commit 8db69fa Mar 5, 2024
107 checks passed
Pranshu-S pushed a commit to Pranshu-S/openvino that referenced this pull request Mar 7, 2024
…penvinotoolkit#23169)

[Transformations] Fix warning: implicit capture of ‘this’ via ‘[=]’

Details:
Implicit capture of 'this' for lambdas is deprecated since C++20. Fix it
by adding a special macro OV_CAPTURE_CPY_AND_THIS which expands into '='
or '=, this' depending on a C++ standard used.

Note:
Although C++20 identifier is 202002L, some compilers supporting C++20,
or its drafts like C++2a, producing the warning, are using 201402L
value. Also, MSVC requires a special check due to the __cplusplus value
compatibility issues.

Ticket: CVS-132688

Signed-off-by: Andrii Staikov [email protected]

Signed-off-by: Andrii Staikov [email protected]
alvoron pushed a commit to alvoron/openvino that referenced this pull request Apr 29, 2024
…penvinotoolkit#23169)

[Transformations] Fix warning: implicit capture of ‘this’ via ‘[=]’

Details:
Implicit capture of 'this' for lambdas is deprecated since C++20. Fix it
by adding a special macro OV_CAPTURE_CPY_AND_THIS which expands into '='
or '=, this' depending on a C++ standard used.

Note:
Although C++20 identifier is 202002L, some compilers supporting C++20,
or its drafts like C++2a, producing the warning, are using 201402L
value. Also, MSVC requires a special check due to the __cplusplus value
compatibility issues.

Ticket: CVS-132688

Signed-off-by: Andrii Staikov [email protected]

Signed-off-by: Andrii Staikov [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: transformations OpenVINO Runtime library - Transformations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants