Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created April 18, 2017 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/ffc79e2eaff26c1887a2723dd620c91f to your computer and use it in GitHub Desktop.
Save deque-blog/ffc79e2eaff26c1887a2723dd620c91f to your computer and use it in GitHub Desktop.
struct finalizer
{
int operator() (int i) const { return i; }
int operator() (std::string const& s) const { return s.size(); }
};
auto weird_gen = one_of_gen(finalizer{},
int_gen(-10, 0),
string_gen(10, letter_gen()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment