[PATCH] Implement std::experimental::sample

Evgeniy Stepanov eugenis at google.com
Mon Apr 27 15:34:08 PDT 2015

> However because sample is a function it can be looked up by ADL. Since sample takes user-defined iterator types and RNG's it is possible that existing unqualified calls to sample in user code may now find std::sample.

No, wait, there is no std::sample. It's std::experimental::sample. And the bad ADL could only happen if one of the arguments is in std::experimental, which probably means it's intentional.

../1.cc:9:3: error: no member named 'sample' in namespace 'std'; did you mean 'std::experimental::sample'?

  std::sample(a, b, c, d, t);



More information about the cfe-commits mailing list