Include a `nameof<>()` utility
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the requested nameof() behavior in the issue and the referenced Apache Arrow commit, since no cpp11 file or test is identified here. Define the supported type-name output and verify that the implementation avoids RTTI and runtime demangling, then add coverage demonstrating the r_string example and other intended generic error-message uses.
Written by the indexing model from the issue text.
Description
It's possible to implement a nameof<T>() which provides a string representation of T without requiring RTTI or demangling at runtime.
assert(nameof<r_string>() == "cpp11::r_string");
This might be helpful in a number of cases including providing better error messages from generics.
For in-the-wild use, see:
https://github.com/apache/arrow/pull/8246/commits/87c26f7a7e5a393681057923a790f6448ea07817#diff-db94c392857c3bad4f5f69e86cde917bR164-R165
- Dominant language
- C++
- Stars
- 224
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/cpp11
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·