Checking whether a number starts with any of a list of string prefixes
It's better to pass containers as references to avoid copying like this:

bool prefix_vect(long double rand, const std::vector&lt;std::string&gt;&amp; prefix)


Also, when iterating on sequence, references also can improve performance:

for(const auto&amp; i : prefix) {


As for one-liner I'd used something like this:

bool prefix_vect2(long double rand, const std::vector&lt;std::string&gt;&amp; prefix) {
    std::string str_rand = std::to_string(rand);
    return std::none_of(prefix.begin(), prefix.end(),
             [&amp;str_rand](const std::string&amp; s){ return boost::starts_with(str_rand, s); });
}