Author
anonymous
over 3 years ago
Language
C++
Compiler
gcc HEAD 12.0.0 20210721 (experimental)
Options
Warnings
Boost 1.73.0
C++2b(GNU)
no pedantic
Author
anonymous
over 3 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2b
prog.cc: In function 'int main()':
prog.cc:14:39: error: no match for call to '(const ranges::views::for_each_fn) (std::vector<int>&, main()::<lambda(int)>)'
14 | auto jv = ranges::views::for_each(vv, [](int a){return a*2;});
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/range-v3/include/range/v3/view.hpp:43,
from /opt/wandbox/range-v3/include/range/v3/all.hpp:25,
from prog.cc:1:
/opt/wandbox/range-v3/include/range/v3/view/for_each.hpp:63:28: note: candidate: 'template<class Fun> constexpr auto ranges::views::for_each_fn::operator()(Fun) const'
63 | constexpr auto operator()(Fun fun) const
| ^~~~~~~~
/opt/wandbox/range-v3/include/range/v3/view/for_each.hpp:63:28: note: template argument deduction/substitution failed:
prog.cc:14:39: note: candidate expects 1 argument, 2 provided
14 | auto jv = ranges::views::for_each(vv, [](int a){return a*2;});
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/range-v3/include/range/v3/view.hpp:43,
from /opt/wandbox/range-v3/include/range/v3/all.hpp:25,
from prog.cc:1:
/opt/wandbox/range-v3/include/range/v3/view/for_each.hpp:52:28: note: candidate: 'template<class Rng, class Fun> requires (viewable_range<Rng>) && (transformable_range<Rng, Fun>) && (joinable_range<ranges::transform_view<decltype(ranges::views::all((declval<Rng>)())), Fun> >) constexpr auto ranges::views::for_each_base_fn::operator()(Rng&&, Fun) const'
52 | constexpr auto operator()(Rng && rng, Fun fun) const
| ^~~~~~~~
/opt/wandbox/range-v3/include/range/v3/view/for_each.hpp:52:28: note: template argument deduction/substitution failed:
/opt/wandbox/range-v3/include/range/v3/view/for_each.hpp:52:28: note: constraints not satisfied
In file included from /opt/wandbox/range-v3/include/range/v3/range_fwd.hpp:22,
from /opt/wandbox/range-v3/include/range/v3/action/action.hpp:21,
from /opt/wandbox/range-v3/include/range/v3/action.hpp:17,
from /opt/wandbox/range-v3/include/range/v3/all.hpp:17,
from prog.cc:1:
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp: In substitution of 'template<class Rng, class Fun> requires (viewable_range<Rng>) && (transformable_range<Rng, Fun>) && (joinable_range<ranges::transform_view<decltype(ranges::views::all((declval<Rng>)())), Fun> >) constexpr auto ranges::views::for_each_base_fn::operator()(Rng&&, Fun) const [with Rng = std::vector<int>&; Fun = main()::<lambda(int)>]':
prog.cc:14:39: required from here
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp:58:5: required for the satisfaction of '_range__requires_<T>' [with T = int]
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp:65:17: required for the satisfaction of 'range<T>' [with T = int]
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp:89:17: required for the satisfaction of 'input_range<ranges::detail::iter_reference_t_<decltype (ranges::_::begin(static_cast<Rng& (*)() noexcept>(nullptr)())), decltype (* declval<decltype (ranges::_::begin(static_cast<Rng& (*)() noexcept>(nullptr)()))&>()), decltype (* declval<decltype (ranges::_::begin(static_cast<Rng& (*)() noexcept>(nullptr)()))&>())&> >' [with Rng = ranges::transform_view<ranges::ref_view<std::vector<int, std::allocator<int> > >, main::._anon_153>]
/opt/wandbox/range-v3/include/range/v3/view/join.hpp:507:9: required for the satisfaction of 'joinable_range__concept_<Rng>' [with Rng = ranges::transform_view<ranges::ref_view<std::vector<int, std::allocator<int> > >, main::._anon_153>]
/opt/wandbox/range-v3/include/range/v3/view/join.hpp:514:21: required for the satisfaction of 'joinable_range<ranges::transform_view<decltype (ranges::views::all(declval<Rng>())), Fun> >' [with Rng = std::vector<int, std::allocator<int> >&; Fun = main::._anon_153]
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp:58:5: in requirements with 'T& t' [with T = int]
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp:61:29: note: the required expression '(ranges::_::begin(t), ranges::_::end(t))' is invalid
61 | ranges::begin(t), // not necessarily equality-preserving
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 | ranges::end(t)
| ~~~~~~~~~~~~~~
/opt/wandbox/range-v3/include/concepts/concepts.hpp:465:7: note: in definition of macro 'CPP_REQUIRES_AUX_'
465 | { __VA_ARGS__; }
| ^~~~~~~~~~~
/opt/wandbox/range-v3/include/concepts/concepts.hpp:67:30: note: in expansion of macro 'CPP_PP_CAT_'
67 | #define CPP_PP_CAT(X, ...) CPP_PP_CAT_(X, __VA_ARGS__)
| ^~~~~~~~~~~
/opt/wandbox/range-v3/include/concepts/concepts.hpp:454:5: note: in expansion of macro 'CPP_PP_CAT'
454 | CPP_PP_CAT(CPP_REQUIRES_, REQS)
| ^~~~~~~~~~
/opt/wandbox/range-v3/include/range/v3/range/concepts.hpp:58:5: note: in expansion of macro 'CPP_requires'
58 | CPP_requires(_range_,
| ^~~~~~~~~~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
Exit Code:
1