boost::algorithm::all_of_equal
// In header: <boost/algorithm/cxx11/all_of.hpp> template<typename Range, typename T> BOOST_CXX14_CONSTEXPR bool all_of_equal(const Range & r, const T & val);
returns true on an empty range
Parameters:
r
The input range
val
A value to compare against
Returns:
true if all elements in the range are equal to 'val'