[FR]: Support properties with default arguments like std::source_location
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
### Does the feature exist in the most recent commit?
No, the invocation is not working with default arguments like the following entry.
struct Foo
{
int foo(std::source_location sl = std::source_location::current());
};
### Why do we need this feature?
std::source_location is a nice feature for tracing the caller source location. It cannot be easily wrapped because then the tracing would not work anymore.
### Describe the proposal.
Extending Property so that arguments can be provided would make it possible. Maybe using std::invoke would make the implementation simpler, too. I could help with that, but I need directions on how you like it.
### Is the feature specific to an operating system, compiler, or build system version?
There are no special requirements, but I think C++ 17 features like std::invoke, std::is_invocable and std::invoke_result would make it more readable.
Contributor guide
Research direction
Start by locating the existing Property implementation and its tests, then inspect how invocation handles methods with default arguments. Use the std::source_location example in the issue as the initial case. Done means Property supports the example without preventing caller source-location tracing, with regression coverage for the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100