Inconsistent stream operators
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- cpp
- Domain
- backend-api-design
Research direction
Review the generator and distribution stream-operator implementations, the BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR and BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR macros, and PR #156. First resolve whether the macros should be removed, applied consistently, or combined with BOOST_RANDOM_NO_STREAM_OPERATORS. Done means the chosen policy is applied consistently across the affected operators.
Written by the indexing model from the issue text.
Description
Found this while working on the fix in https://github.com/boostorg/random/pull/156
There are 2 levels of preprocessor macros used for the stream operators of generators and distributions:
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR/BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR
Replacement using static print/read functions forBOOST_MSVC, <= 1310andSUNPRO_CCBOOST_RANDOM_NO_STREAM_OPERATORS: Disable stream operators whenBOOST_NO_OPERATORS_IN_NAMESPACE || BOOST_NO_MEMBER_TEMPLATE_FRIENDS
However they are used very inconsistently.
I can offer to fix this but would need a decision first:
- Get rid of all those macros replacing them by standard
operator<<where used - Use them where not used yet
2b. Then useBOOST_RANDOM_NO_STREAM_OPERATORSto turn those macros into staticprint&readfunctions, as current just without the operators instead of having to check for this macro in each case.
- Dominant language
- C++
- Stars
- 42
- Forks
- 76
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
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 boostorg/random
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Documentation
Difficulty 4/5 3-5 days Newbie friendliness 25/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 ·