Skip to content

fix universal: make ForwardLike conform to the standard#1222

Open
ddvamp wants to merge 1 commit into
userver-framework:developfrom
ddvamp:userver-patch-forward_like
Open

fix universal: make ForwardLike conform to the standard#1222
ddvamp wants to merge 1 commit into
userver-framework:developfrom
ddvamp:userver-patch-forward_like

Conversation

@ddvamp
Copy link
Copy Markdown
Contributor

@ddvamp ddvamp commented Apr 29, 2026

Fixes #1202

(Optional) Additionally, added support for && members in USERVER_IMPL_STRUCT_SUBSET_(REF_)MAP

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test has been run on std::forward_like from gcc and clang.

@apolukhin
Copy link
Copy Markdown
Member

LGTM

@robot-magpie
Copy link
Copy Markdown

robot-magpie Bot commented May 4, 2026

Many thanks for the PR! @apolukhin is now importing your pull request into our internal upstream repository.

@apolukhin
Copy link
Copy Markdown
Member

apolukhin commented May 12, 2026

@ddvamp clang-tidy complains:

taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:302:15: error: 'deps' used after it was moved [bugprone-use-after-move,-warnings-as-errors]
  302 |     EXPECT_EQ(deps.a.value, 41);
      |               ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:301:21: note: move occurred here
  301 |     SmolDeps smol = std::move(deps);
      |                     ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:315:15: error: 'deps' used after it was moved [bugprone-use-after-move,-warnings-as-errors]
  315 |     EXPECT_EQ(deps.a.value, 41);
      |               ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:314:21: note: move occurred here
  314 |     SmolDeps smol = std::move(deps);
      |                     ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:359:15: error: 'deps' used after it was moved [bugprone-use-after-move,-warnings-as-errors]
  359 |     EXPECT_EQ(deps.a.value, 41);
      |               ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:358:24: note: move occurred here
  358 |     SmolDepsRef smol = std::move(deps);
      |                        ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:372:15: error: 'deps' used after it was moved [bugprone-use-after-move,-warnings-as-errors]
  372 |     EXPECT_EQ(deps.a.value, 41);
      |               ^
taxi/uservices/userver/universal/src/utils/struct_subsets_test.cpp:371:24: note: move occurred here
  371 |     SmolDepsRef smol = std::move(deps);
      |                        ^

Please fix (for example just rever the macro changes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

utils::ForwardLike is not actually like std::forward_like

2 participants