Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Boost 1.76.0
C++2b(GNU)
no pedantic

Author

anonymous

about 4 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.76.0/gcc-11.1.0/include -std=gnu++2b
prog.cc: In instantiation of 'void func(const std::array<int, N>&) [with long unsigned int N = 3]':
prog.cc:14:9:   required from here
prog.cc:9:20: error: no match for 'operator|' (operand types are 'const std::array<int, 3>' and 'std::ranges::views::__adaptor::_Partial<std::ranges::views::_Take, long unsigned int>')
    9 |     ranges::copy(a | views::take(N - 1), begin(b));
      |                  ~~^~~~~~~~~~~~~~~~~~~~
In file included from prog.cc:3:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:772:7: note: candidate: 'template<class _Lhs, class _Rhs>  requires (derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (derived_from<_Rhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) constexpr auto std::ranges::views::__adaptor::operator|(_Lhs, _Rhs)'
  772 |       operator|(_Lhs __lhs, _Rhs __rhs)
      |       ^~~~~~~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:772:7: note:   template argument deduction/substitution failed:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:772:7: note: constraints not satisfied
In file included from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/compare:39,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/stl_pair.h:65,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/utility:70,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/array:38,
                 from prog.cc:1:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/concepts: In substitution of 'template<class _Lhs, class _Rhs>  requires (derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (derived_from<_Rhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) constexpr auto std::ranges::views::__adaptor::operator|(_Lhs, _Rhs) [with _Lhs = std::array<int, 3>; _Rhs = std::ranges::views::__adaptor::_Partial<std::ranges::views::_Take, long unsigned int>]':
prog.cc:9:20:   required from 'void func(const std::array<int, N>&) [with long unsigned int N = 3]'
prog.cc:14:9:   required from here
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/concepts:67:13:   required for the satisfaction of 'derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>' [with _Lhs = std::array<int, 3>]
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/concepts:67:28: note:   'std::ranges::views::__adaptor::_RangeAdaptorClosure' is not a base of 'std::array<int, 3>'
   67 |     concept derived_from = __is_base_of(_Base, _Derived)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from prog.cc:3:
prog.cc: In instantiation of 'void func(const std::array<int, N>&) [with long unsigned int N = 3]':
prog.cc:14:9:   required from here
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:763:7: note: candidate: 'template<class _Self, class _Range>  requires (derived_from<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&)'
  763 |       operator|(_Range&& __r, _Self&& __self)
      |       ^~~~~~~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:763:7: note:   template argument deduction/substitution failed:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:763:7: note: constraints not satisfied
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges: In substitution of 'template<class _Self, class _Range>  requires (derived_from<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = std::ranges::views::__adaptor::_Partial<std::ranges::views::_Take, long unsigned int>; _Range = const std::array<int, 3>&]':
prog.cc:9:20:   required from 'void func(const std::array<int, N>&) [with long unsigned int N = 3]'
prog.cc:14:9:   required from here
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:739:13:   required for the satisfaction of '__adaptor_invocable<_Self, _Range>' [with _Self = std::ranges::views::__adaptor::_Partial<std::ranges::views::_Take, long unsigned int>; _Range = const std::array<int, 3>&]
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:740:9:   in requirements  [with _Args = {const std::array<int, 3>&}; _Adaptor = std::ranges::views::__adaptor::_Partial<std::ranges::views::_Take, long unsigned int>]
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ranges:740:44: note: the required expression 'declval<_Adaptor>()((declval<_Args>)()...)' is invalid
  740 |       = requires { std::declval<_Adaptor>()(declval<_Args>()...); };
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
prog.cc: In instantiation of 'void func(const std::array<int, N>&) [with long unsigned int N = 3]':
prog.cc:14:9:   required from here
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
In file included from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/streambuf:41,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/streambuf_iterator.h:35,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/iterator:66,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ranges_algobase.h:36,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ranges_algo.h:35,
                 from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/algorithm:64,
                 from prog.cc:2:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ios_base.h:87:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator|(std::_Ios_Fmtflags, std::_Ios_Fmtflags)'
   87 |   operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
      |   ^~~~~~~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ios_base.h:87:27: note:   no known conversion for argument 1 from 'const std::array<int, 3>' to 'std::_Ios_Fmtflags'
   87 |   operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
      |             ~~~~~~~~~~~~~~^~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ios_base.h:129:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator|(std::_Ios_Openmode, std::_Ios_Openmode)'
  129 |   operator|(_Ios_Openmode __a, _Ios_Openmode __b)
      |   ^~~~~~~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ios_base.h:129:27: note:   no known conversion for argument 1 from 'const std::array<int, 3>' to 'std::_Ios_Openmode'
  129 |   operator|(_Ios_Openmode __a, _Ios_Openmode __b)
      |             ~~~~~~~~~~~~~~^~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ios_base.h:169:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator|(std::_Ios_Iostate, std::_Ios_Iostate)'
  169 |   operator|(_Ios_Iostate __a, _Ios_Iostate __b)
      |   ^~~~~~~~
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/ios_base.h:169:26: note:   no known conversion for argument 1 from 'const std::array<int, 3>' to 'std::_Ios_Iostate'
  169 |   operator|(_Ios_Iostate __a, _Ios_Iostate __b)
      |             ~~~~~~~~~~~~~^~~
Exit Code:
1