Skip to content

fix utils: make enumerate consistent with respect to const#1194

Open
ddvamp wants to merge 1 commit intouserver-framework:developfrom
ddvamp:userver-patch-enumerate
Open

fix utils: make enumerate consistent with respect to const#1194
ddvamp wants to merge 1 commit intouserver-framework:developfrom
ddvamp:userver-patch-enumerate

Conversation

@ddvamp
Copy link
Copy Markdown
Contributor

@ddvamp ddvamp commented Apr 23, 2026

Fixes #1193

/// "structured binding" like this
/// of index and reference to element. The reference is const-qualified if either
/// the wrapper itself or the underlying container is const; otherwise, it is non-const.
/// It can be used in "range based for loop" with "structured binding" like this
Copy link
Copy Markdown
Member

@apolukhin apolukhin Apr 23, 2026

Choose a reason for hiding this comment

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

please, add tests for the functionality

Copy link
Copy Markdown
Contributor Author

@ddvamp ddvamp Apr 25, 2026

Choose a reason for hiding this comment

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

How to write compile-time tests correctly?

Are targeted changes and side changes (refactoring, removing/adding headers, removing obsolete code, etc.) allowed in one PR?

Is there documentation on formatting, as well as on the rules for using headers? I've seen names used without their corresponding headers. There are also unused headers.

@ddvamp ddvamp force-pushed the userver-patch-enumerate branch from d3a85ee to ee09f85 Compare April 25, 2026 03:04
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.

Inconsistency in enumerate related to const

2 participants