MCPcopy Create free account
hub / github.com/HelenOS/helenos / discard_block_engine

Class discard_block_engine

uspace/lib/cpp/include/__bits/random.hpp:628–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626
627 template<class Engine, size_t p, size_t r>
628 class discard_block_engine
629 {
630 static_assert(0 < r);
631 static_assert(r <= p);
632
633 public:
634 using result_type = typename Engine::result_type;
635
636 static constexpr size_t block_size = p;
637 static constexpr size_t used_block = r;
638
639 static constexpr result_type min()
640 {
641 return Engine::min();
642 }
643
644 static constexpr result_type max()
645 {
646 return Engine::max();
647 }
648
649 discard_block_engine()
650 : engine_{}, n_{}
651 { /* DUMMY BODY */ }
652
653 explicit discard_block_engine(const Engine& e)
654 : engine_{e}, n_{}
655 { /* DUMMY BODY */ }
656
657 explicit discard_block_engine(Engine&& e)
658 : engine_{move(e)}, n_{}
659 { /* DUMMY BODY */ }
660
661 explicit discard_block_engine(result_type s)
662 : engine_{s}, n_{}
663 { /* DUMMY BODY */ }
664
665 template<class Seq>
666 explicit discard_block_engine(
667 enable_if_t<aux::is_seed_sequence_v<Seq, result_type>, Seq&> q
668 )
669 : engine_{q}, n_{}
670 { /* DUMMY BODY */ }
671
672 void seed()
673 {
674 engine_.seed();
675 }
676
677 void seed(result_type s)
678 {
679 engine_.seed(s);
680 }
681
682 template<class Seq>
683 void seed(
684 enable_if_t<aux::is_seed_sequence_v<Seq, result_type>, Seq&> q
685 )

Callers

nothing calls this directly

Calls 3

flagsMethod · 0.80
setstateMethod · 0.80
widenMethod · 0.45

Tested by

no test coverage detected