partial_sum_depr.cpp 687 B

12345678910111213141516171819202122232425
  1. // Range v3 library
  2. //
  3. // Copyright Eric Niebler 2014-present
  4. //
  5. // Use, modification and distribution is subject to the
  6. // Boost Software License, Version 1.0. (See accompanying
  7. // file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // Project home: https://github.com/ericniebler/range-v3
  11. #include <range/v3/core.hpp>
  12. RANGES_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
  13. #include <range/v3/view/partial_sum.hpp>
  14. #include "../simple_test.hpp"
  15. #include "../test_utils.hpp"
  16. int main()
  17. {
  18. static int const some_ints[] = {0,1,2,3,4};
  19. auto rng = some_ints | ranges::views::partial_sum();
  20. ::check_equal(rng, {0,1,3,6,10});
  21. return ::test_result();
  22. }