![]() Nevertheless we typically do not describe conditional Throws elements in proper Q.generate(rb,re) from Table 115 that says: "Throws nothing if operations of rb and reĭo not throw exceptions". ![]() random_device::operator()Įxplicitly states when it throws exceptions.Ī less radical variant of the previous suggestion would be to add a normative requirement on the expression Like that of the expression g() in Table 116 for good reasons, e.g. Furthermore, we do not impose comparable constraints for other expressions, Impose no-throw requirements on iterator operations and this would restrict general seed sequences whereĮxceptions are not a problem. Q.generate(rb,re) from Table 115, but this is not as simple as it looks initially, because thisįunction again depends on general types that are mutable random access iterators. Operations of seed_seq::generate() won't throw except from operations of the provided iterator range,īut there is no corresponding "safety belt" for user-provided SSeq types, since 26.6.1.2 ĭoes not impose no-throw requirements onto operations of seed sequences.Ī quite radical step to fix this problem would be to impose general no-throw requirements on the expression None of these operations has an exclusion rule for exceptions.Īs described in 2180 the wording for std::seed_seq should and can be fixed to ensure that Void linear_congruential_engine::seed(Sseq& q) Linear_congruential_engine::linear_congruential_engine(Sseq& q) With class template linear_congruential_engine we have just one example for a user of std::seed_seq), and those of the random access iterator type SSeq::generate() which is a function template, that depends both on operations provided by the ![]() This constraint causes problems, because the described templates in these sub-clauses depend on operations of In regard to general types satisfying the seed sequence constraints (named SSeq) as described inĢ6.6.3 p3 and 26.6.4.1 p3 say upfront:Įxcept where specified otherwise, no function described in this sectionĢ6.6.3 /26.6.4 throws an exception. Type std::seed_seq regarding exceptions, but there is another specification problem ![]() LWG issue 2180 points out some deficiences in regard to the specification of the library-provided Section: 26.6.1.2, 26.6.3, 26.6.4 Status: Ready Submitter: Daniel Krügler Opened: Last modified: C++ Standard Library Issues to be moved in Oulu C++ Standard Library Issues to be moved in Oulu Doc. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |