Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9906 closed Bugs (wontfix)

random/test/seed_seq_archetype missing result_type?

Reported by: thijs@… Owned by: No-Maintainer
Milestone: To Be Determined Component: random
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

I'm not sure if I have identified the problem correctly, but I think it's like this:

I'm testing a new random engine against the boost random/test/ scripts. In my code I'm using

BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(my_engine, SeeqSeq, seq) { ... sizeof(typename SeeqSeq::result_type)

and the script test my code with

SeeqSeq = boost::random::test::seed_seq_archetype<boost::null_archetype<int> >

This seed_seq_archetype defined in random/test/concepts.hpp seems to be missing result_type. It has value_type instead. The C++11 draft (N3242 p905) says it should have a result_type and that's also what I see in boost/random/seed_seq.hpp

Change History (3)

comment:1 by Steven Watanabe, 9 years ago

The standard requirements on SeedSeq are basically a clone of the interface of seed_seq, which is unnecessarily restrictive. I deliberately relaxed the requirements in Boost.Random.

Last edited 9 years ago by Steven Watanabe (previous) (diff)

comment:2 by Steven Watanabe, 9 years ago

Resolution: wontfix
Status: newclosed

Also, if you're doing anything with !SeedSeq::result_type, it's probably wrong. A SeedSeq always gives 32-bit outputs regardless of the result_type.

comment:3 by Thijs@…, 9 years ago

Thanks for the info. I was indeed thinking that "at least 32 bit" was determined to the size of result_type. This also explains the fixed size 32 bit I see in ::detail. I'll use those routines instead.

Note: See TracTickets for help on using tickets.