Skip to content

Inconsistent stream operators #165

Description

@Flamefire

Found this while working on the fix in #156

There are 2 levels of preprocessor macros used for the stream operators of generators and distributions:

  1. BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR / BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR
    Replacement using static print/read functions for BOOST_MSVC, <= 1310 and SUNPRO_CC
  2. BOOST_RANDOM_NO_STREAM_OPERATORS: Disable stream operators when BOOST_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:

  1. Get rid of all those macros replacing them by standard operator<< where used
  2. Use them where not used yet
    2b. Then use BOOST_RANDOM_NO_STREAM_OPERATORS to turn those macros into static print & read functions, as current just without the operators instead of having to check for this macro in each case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions