boostorg / boostorg/safe_numerics
Consider defaulting template parameters for exception_policy class
- Dominant language
- C++
- Stars
- 222
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
From the documentation
```cpp
using logging_exception_policy = exception_policy<
log_runtime_exception, // arithmetic error
ignore_exception, // implementation defined behavior
ignore_exception, // undefined behavior
ignore_exception // uninitialized value
>;
```
It would make it less verbose to default the last three template parameters, in which case the example will look like this:
```
using logging_exception_policy = exception_policy<
log_runtime_exception, // arithmetic error
>;
```
making use cases like this simpler: https://godbolt.org/z/Yqa51dE7b
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the exception_policy class template declaration and compare it with the documentation example shown in the issue. Check the linked Compiler Explorer case to understand the intended shorter usage. Done means the last three template parameters can be omitted while preserving the documented behavior and the example compiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100