We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code fails to compile with versions of gcc before the 7.x series.
#include <range/v3/core.hpp> #include <range/v3/algorithm/count.hpp> int main() { return ranges::count({true,false,true,false}, true); }
The error message is:
prog.cc: In function 'int main()': prog.cc:5:55: error: call of '(const ranges::v3::with_braced_init_args<ranges::v3::with_braced_init_args<ranges::v3::count_fn> >) (<brace-enclosed initializer list>, bool)' is ambiguous return ranges::count({true,false,true,false}, true); ^ In file included from /opt/wandbox/range-v3/include/range/v3/utility/iterator_concepts.hpp:23:0, from /opt/wandbox/range-v3/include/range/v3/begin_end.hpp:25, from /opt/wandbox/range-v3/include/range/v3/core.hpp:17, from prog.cc:1: /opt/wandbox/range-v3/include/range/v3/utility/functional.hpp:889:18: note: candidate: constexpr decltype (declval<const ImplFn&>()(std::move(rng0), (declval<Args>)()...)) ranges::v3::with_braced_init_args<ImplFn>::operator()(std::initializer_list<V0>&&, Args&& ...) const [with V0 = bool; Args = {bool}; ImplFn = ranges::v3::with_braced_init_args<ranges::v3::count_fn>; decltype (declval<const ImplFn&>()(std::move(rng0), (declval<Args>)()...)) = long int] auto operator()(std::initializer_list<V0> &&rng0, Args &&...args) const -> ^~~~~~~~ /opt/wandbox/range-v3/include/range/v3/utility/functional.hpp:889:18: note: candidate: constexpr decltype (declval<const ImplFn&>()(std::move(rng0), (declval<Args>)()...)) ranges::v3::with_braced_init_args<ImplFn>::operator()(std::initializer_list<V0>&&, Args&& ...) const [with V0 = bool; Args = {bool}; ImplFn = ranges::v3::count_fn; decltype (declval<const ImplFn&>()(std::move(rng0), (declval<Args>)()...)) = long int]
The text was updated successfully, but these errors were encountered:
Meta question: do we even care about calling the algorithms with braced init lists? The Ranges TS doesn't bother with handling these.
Sorry, something went wrong.
If you aren't motivated enough to specify this feature - I know I'm not - then it's probably not useful enough to keep around. Drop in 0.4?
None of the algorithms in the v1.0-beta branch use with_braced_init_args, so closing as fixed.
with_braced_init_args
No branches or pull requests
The following code fails to compile with versions of gcc before the 7.x series.
The error message is:
The text was updated successfully, but these errors were encountered: