Isn't std::bernoulli_distribution inefficient? Designing a bit-parallel Bernoulli generator
Actually, generating a pseudorandom integer is very fast, so the simple approach will likely be quite efficient.  As always, beware premature optimization.  Benchmark it first before assuming it'll be too slow.

If you have a power-of-two denominator, it's easy to come up with a procedure that doesn't require as many random bits -- but in practice this doesn't matter, because with most PRNGs, it's just as fast to generate an entire word as to generate a few pseudorandom bits.