A small difference between `boost::pfr::get` and `std::get`
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 176
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 1
Description
As we know, `std::get` overloads for a `std::tuple` can't return values, it always returns a reference(https://en.cppreference.com/w/cpp/utility/tuple/get).
This library shows itself as "tuple-like interface" and i suppose that `boost::pfr::get` must be fit to `std::get` in every detail.
But i find that `boost::pfr::get` in some cases can return a value, and make a copy: https://godbolt.org/z/1GWaqsah4
Can we fix it? Or is it better not to touch it, to prevent a breaking change?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the boost::pfr::get implementation and compare its return behavior with the std::get overloads linked in the issue. Use the provided Compiler Explorer example to reproduce the copy, then determine whether changing the behavior would be a breaking API change and document or test the chosen outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100