Skip to content

Conversation

miscco
Copy link
Contributor

@miscco miscco commented Apr 23, 2021

Fixes #1685

@miscco miscco requested a review from a team as a code owner April 23, 2021 10:19
stl/inc/ranges Outdated
_NODISCARD constexpr decltype(auto) operator*() const
noexcept(noexcept(_STD get<_Index>(*_Current))) /* strengthened */ {
return _STD get<_Index>(*_Current);
if constexpr (is_reference_v<range_reference_t<_Base>>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that I decided against implementing the exposition only get-element method

@StephanTLavavej StephanTLavavej added the LWG Library Working Group issue label Apr 23, 2021
@CaseyCarter CaseyCarter self-assigned this Apr 28, 2021
@CaseyCarter
Copy link
Contributor

FYI: I've pushed a commit that fixes non-functional nitpicks in the test code, a bug in the conditional noexcept (detailed in #1878 (comment)), and pulls using _ElemTy = tuple_element_t<_Index, range_value_t<_Base>>; out into class scope to simplify the conditional noexcepts.

@CaseyCarter CaseyCarter removed their assignment Apr 29, 2021
@StephanTLavavej StephanTLavavej self-assigned this Apr 30, 2021
@StephanTLavavej StephanTLavavej merged commit 4946c74 into microsoft:main May 1, 2021
@StephanTLavavej
Copy link
Member

Thanks for implementing this LWG issue resolution! All shall love conformance and despair! 😻 ✔️ 🚀

@miscco miscco deleted the lwg3502 branch May 17, 2021 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG-3502 elements_view should not be allowed to return dangling references
5 participants