Function makeSeq


#include <include/rapidcheck/Seq.hpp>

template <typename Impl, typename... Args>
Seq< typename rc::compat::return_type< Impl >::type::ValueType > makeSeq(Args &&... args)


Creates a new Seq using the implementation class specificed by the type parameter constructed by forwarding the given arguments.


Lines 62-70 in include/rapidcheck/Seq.hpp.

template <typename Impl, typename... Args>
Seq<typename rc::compat::return_type<Impl>::type::ValueType> makeSeq(Args &&... args) {
  using SeqT = Seq<typename rc::compat::return_type<Impl>::type::ValueType>;
  using ImplT = typename SeqT::template SeqImpl<Impl>;

  SeqT seq;
  seq.m_impl.reset(new ImplT(std::forward<Args>(args)...));
  return seq;

Add Discussion as Guest

Log in