int a = 0, b = 0, c = 1;
std::initializer_list<int> arr = {a,b,c};
if (std::any_of(std::begin(arr), std::end(arr), [](int x){return x > 0;}))
std::cout<< "any > 0" <<std::endl; int a = 0, b = 0, c = 1;
if (std::any_of({a,b,c}, [](int x){return x > 0;}))
std::cout<< "any > 0" <<std::endl;2016-02-25 12:19 GMT+01:00 <push...@gmail.com>:
> It would be great to have functions any_of, none_of, all_of what works with
> initializer lists
>
> now it is:
>
> int a = 0, b = 0, c = 1;
> std::initializer_list<int> arr = {a,b,c};
> if (std::any_of(std::begin(arr), std::end(arr), [](int x){return x > 0;}))
> std::cout<< "any > 0" <<std::endl;
>
> proposal is:
>
> int a = 0, b = 0, c = 1;
> if (std::any_of({a,b,c}, [](int x){return x > 0;}))
> std::cout<< "any > 0" <<std::endl;
This feature would automatically fall out of the range TS,