Created
July 7, 2017 06:29
-
-
Save dexonsmith/040912b08b6b2ee8c203bfc3f003acc4 to your computer and use it in GitHub Desktop.
Error message for STL2 + GCC Concepts implementation: sorting a list<int>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.cpp:6:53: error: no matching function for call to ‘sort(std::__cxx11::list<int>::iterator, std::__cxx11::list<int>::iterator)’ | |
std::experimental::ranges::sort(l.begin(), l.end()); | |
^ | |
In file included from include/stl2/algorithm.hpp:90:0, | |
from t.cpp:3: | |
include/stl2/detail/algorithm/sort.hpp:31:4: note: candidate: I std::experimental::ranges::v1::sort(I, S, Comp, Proj) [with I = std::_List_iterator<int>; S = std::_List_iterator<int>; Comp = std::experimental::ranges::v1::less<void>; Proj = std::experimental::ranges::v1::identity] | |
I sort(I first, S sent, Comp comp = Comp{}, Proj proj = Proj{}) | |
^~~~ | |
include/stl2/detail/algorithm/sort.hpp:31:4: note: constraints not satisfied | |
In file included from include/stl2/detail/iterator/basic_iterator.hpp:23:0, | |
from include/stl2/detail/iterator/any_iterator.hpp:22, | |
from include/stl2/iterator.hpp:22, | |
from include/stl2/detail/algorithm/adjacent_find.hpp:17, | |
from include/stl2/algorithm.hpp:18, | |
from t.cpp:3: | |
include/stl2/detail/iterator/concepts.hpp:652:15: note: within ‘template<class I> concept const bool std::experimental::ranges::v1::RandomAccessIterator<I> [with I = std::_List_iterator<int>]’ | |
concept bool RandomAccessIterator = | |
^~~~~~~~~~~~~~~~~~~~ | |
In file included from include/stl2/type_traits.hpp:19:0, | |
from include/stl2/detail/swap.hpp:16, | |
from include/stl2/detail/tagged.hpp:19, | |
from include/stl2/detail/algorithm/tagspec.hpp:16, | |
from include/stl2/algorithm.hpp:16, | |
from t.cpp:3: | |
include/stl2/detail/concepts/core.hpp:76:15: note: within ‘template<class T, class U> concept const bool std::experimental::ranges::v1::DerivedFrom<T, U> [with T = std::experimental::ranges::v1::bidirectional_iterator_tag; U = std::experimental::ranges::v1::random_access_iterator_tag]’ | |
concept bool DerivedFrom = | |
^~~~~~~~~~~ | |
include/stl2/detail/concepts/core.hpp:76:15: note: ‘std::experimental::ranges::v1::random_access_iterator_tag’ is not a base of ‘std::experimental::ranges::v1::bidirectional_iterator_tag’ | |
include/stl2/detail/concepts/core.hpp:76:15: note: ‘std::is_convertible<std::experimental::ranges::v1::bidirectional_iterator_tag*, std::experimental::ranges::v1::random_access_iterator_tag*>::value’ evaluated to false | |
In file included from include/stl2/detail/iterator/basic_iterator.hpp:23:0, | |
from include/stl2/detail/iterator/any_iterator.hpp:22, | |
from include/stl2/iterator.hpp:22, | |
from include/stl2/detail/algorithm/adjacent_find.hpp:17, | |
from include/stl2/algorithm.hpp:18, | |
from t.cpp:3: | |
include/stl2/detail/iterator/concepts.hpp:545:15: note: within ‘template<class S, class I> concept const bool std::experimental::ranges::v1::SizedSentinel<S, I> [with S = std::_List_iterator<int>; I = std::_List_iterator<int>]’ | |
concept bool SizedSentinel = | |
^~~~~~~~~~~~~ | |
include/stl2/detail/iterator/concepts.hpp:545:15: note: with ‘const std::_List_iterator<int> i’ | |
include/stl2/detail/iterator/concepts.hpp:545:15: note: with ‘const std::_List_iterator<int> s’ | |
include/stl2/detail/iterator/concepts.hpp:545:15: note: the required expression ‘(s - i)’ would be ill-formed | |
include/stl2/detail/iterator/concepts.hpp:545:15: note: the required expression ‘(i - s)’ would be ill-formed | |
In file included from include/stl2/detail/concepts/object/regular.hpp:17:0, | |
from include/stl2/detail/concepts/object.hpp:20, | |
from include/stl2/detail/tagged.hpp:22, | |
from include/stl2/detail/algorithm/tagspec.hpp:16, | |
from include/stl2/algorithm.hpp:16, | |
from t.cpp:3: | |
include/stl2/detail/concepts/compare.hpp:140:15: note: within ‘template<class T> concept const bool std::experimental::ranges::v1::StrictTotallyOrdered<T> [with T = std::_List_iterator<int>]’ | |
concept bool StrictTotallyOrdered = | |
^~~~~~~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/compare.hpp:125:15: note: within ‘template<class T, class U> concept const bool std::experimental::ranges::v1::__totally_ordered<T, U> [with T = std::_List_iterator<int>; U = std::_List_iterator<int>]’ | |
concept bool __totally_ordered = | |
^~~~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/compare.hpp:125:15: note: with ‘std::remove_reference_t<std::_List_iterator<int> >& t’ | |
include/stl2/detail/concepts/compare.hpp:125:15: note: with ‘std::remove_reference_t<std::_List_iterator<int> >& u’ | |
include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression ‘(t < u)’ would be ill-formed | |
include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression ‘(t > u)’ would be ill-formed | |
include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression ‘(t <= u)’ would be ill-formed | |
include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression ‘(t >= u)’ would be ill-formed | |
In file included from include/stl2/detail/iterator/concepts.hpp:27:0, | |
from include/stl2/detail/iterator/basic_iterator.hpp:23, | |
from include/stl2/detail/iterator/any_iterator.hpp:22, | |
from include/stl2/iterator.hpp:22, | |
from include/stl2/detail/algorithm/adjacent_find.hpp:17, | |
from include/stl2/algorithm.hpp:18, | |
from t.cpp:3: | |
include/stl2/detail/iterator/increment.hpp:138:16: note: within ‘template<class I> concept const bool std::experimental::ranges::v1::ext::RandomAccessIncrementable<I> [with I = std::_List_iterator<int>]’ | |
concept bool RandomAccessIncrementable = | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
include/stl2/detail/iterator/increment.hpp:138:16: note: with ‘std::_List_iterator<int>& i’ | |
include/stl2/detail/iterator/increment.hpp:138:16: note: with ‘const std::_List_iterator<int>& ci’ | |
include/stl2/detail/iterator/increment.hpp:138:16: note: with ‘std::experimental::ranges::v1::difference_type_t<std::_List_iterator<int> > n’ | |
include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression ‘i += n’ would be ill-formed | |
include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression ‘i -= n’ would be ill-formed | |
include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression ‘(ci + n)’ would be ill-formed | |
include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression ‘(n + ci)’ would be ill-formed | |
include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression ‘(ci - n)’ would be ill-formed | |
include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression ‘(ci - ci)’ would be ill-formed | |
In file included from include/stl2/detail/iterator/basic_iterator.hpp:23:0, | |
from include/stl2/detail/iterator/any_iterator.hpp:22, | |
from include/stl2/iterator.hpp:22, | |
from include/stl2/detail/algorithm/adjacent_find.hpp:17, | |
from include/stl2/algorithm.hpp:18, | |
from t.cpp:3: | |
include/stl2/detail/iterator/concepts.hpp:652:15: note: with ‘const std::_List_iterator<int>& ci’ | |
concept bool RandomAccessIterator = | |
^~~~~~~~~~~~~~~~~~~~ | |
include/stl2/detail/iterator/concepts.hpp:652:15: note: with ‘std::experimental::ranges::v1::difference_type_t<std::_List_iterator<int> > n’ | |
include/stl2/detail/iterator/concepts.hpp:652:15: note: the required expression ‘ci[n]’ would be ill-formed | |
t.cpp:6:53: note: ill-formed constraint | |
std::experimental::ranges::sort(l.begin(), l.end()); | |
^ | |
In file included from include/stl2/algorithm.hpp:90:0, | |
from t.cpp:3: | |
include/stl2/detail/algorithm/sort.hpp:46:23: note: candidate: template<class Rng, class Comp, class Proj> requires RandomAccessRange<Rng> and Sortable<decltype((std::experimental::ranges::v1::<unnamed>::begin)((declval<R&>)())), Comp, Proj> std::experimental::ranges::v1::safe_iterator_t<Rng> std::experimental::ranges::v1::sort(Rng&&, Comp, Proj) | |
safe_iterator_t<Rng> sort(Rng&& rng, Comp comp = Comp{}, Proj proj = Proj{}) | |
^~~~ | |
include/stl2/detail/algorithm/sort.hpp:46:23: note: template argument deduction/substitution failed: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.cpp:12:53: error: no matching function for call to ‘sort(std::vector<MyType>::iterator, std::vector<MyType>::iterator)’ | |
std::experimental::ranges::sort(v.begin(), v.end()); | |
^ | |
In file included from include/stl2/algorithm.hpp:90:0, | |
from t.cpp:3: | |
include/stl2/detail/algorithm/sort.hpp:31:4: note: candidate: I std::experimental::ranges::v1::sort(I, S, Comp, Proj) [with I = __gnu_cxx::__normal_iterator<MyType*, std::vector<MyType> >; S = __gnu_cxx::__normal_iterator<MyType*, std::vector<MyType> >; Comp = std::experimental::ranges::v1::less<void>; Proj = std::experimental::ranges::v1::identity] | |
I sort(I first, S sent, Comp comp = Comp{}, Proj proj = Proj{}) | |
^~~~ | |
include/stl2/detail/algorithm/sort.hpp:31:4: note: constraints not satisfied | |
In file included from include/stl2/detail/algorithm/partition_point.hpp:28:0, | |
from include/stl2/detail/algorithm/lower_bound.hpp:18, | |
from include/stl2/detail/algorithm/binary_search.hpp:18, | |
from include/stl2/algorithm.hpp:21, | |
from t.cpp:3: | |
include/stl2/detail/concepts/algorithm.hpp:79:15: note: within ‘template<class I, class R, class P> concept const bool std::experimental::ranges::v1::Sortable<I, R, P> [with I = __gnu_cxx::__normal_iterator<MyType*, std::vector<MyType> >; R = std::experimental::ranges::v1::less<void>; P = std::experimental::ranges::v1::identity]’ | |
concept bool Sortable = | |
^~~~~~~~ | |
In file included from include/stl2/detail/algorithm/adjacent_find.hpp:19:0, | |
from include/stl2/algorithm.hpp:18, | |
from t.cpp:3: | |
include/stl2/detail/concepts/callable.hpp:187:15: note: within ‘template<class F, class I1, class I2> concept const bool std::experimental::ranges::v1::IndirectStrictWeakOrder<F, I1, I2> [with F = std::experimental::ranges::v1::less<void>; I1 = std::experimental::ranges::v1::projected<__gnu_cxx::__normal_iterator<MyType*, std::vector<MyType> >, std::experimental::ranges::v1::identity>; I2 = std::experimental::ranges::v1::projected<__gnu_cxx::__normal_iterator<MyType*, std::vector<MyType> >, std::experimental::ranges::v1::identity>]’ | |
concept bool IndirectStrictWeakOrder = | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
In file included from include/stl2/detail/functional/not_fn.hpp:19:0, | |
from include/stl2/functional.hpp:24, | |
from include/stl2/detail/algorithm/adjacent_find.hpp:16, | |
from include/stl2/algorithm.hpp:18, | |
from t.cpp:3: | |
include/stl2/detail/concepts/function.hpp:103:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::StrictWeakOrder<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool StrictWeakOrder = | |
^~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::Relation<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool Relation = | |
^~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, const MyType&, const MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {const MyType&, const MyType&}] | |
include/stl2/detail/concepts/function.hpp:103:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::StrictWeakOrder<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool StrictWeakOrder = | |
^~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::Relation<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool Relation = | |
^~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, const MyType&, const MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {const MyType&, const MyType&}] | |
include/stl2/detail/concepts/function.hpp:103:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::StrictWeakOrder<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool StrictWeakOrder = | |
^~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::Relation<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool Relation = | |
^~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, const MyType&, const MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {const MyType&, const MyType&}] | |
include/stl2/detail/concepts/function.hpp:103:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::StrictWeakOrder<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool StrictWeakOrder = | |
^~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::Relation<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool Relation = | |
^~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, MyType&, MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {MyType&, MyType&}] | |
include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept ‘Predicate<std::experimental::ranges::v1::less<void>&, const MyType&, const MyType&>’ template<class F, class ... Args> concept const bool std::experimental::ranges::v1::Predicate<F, Args ...> [with F = std::experimental::ranges::v1::less<void>&; Args = {const MyType&, const MyType&}] | |
include/stl2/detail/concepts/function.hpp:103:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::StrictWeakOrder<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool StrictWeakOrder = | |
^~~~~~~~~~~~~~~ | |
include/stl2/detail/concepts/function.hpp:75:15: note: within ‘template<class R, class T, class U> concept const bool std::experimental::ranges::v1::Relation<R, T, U> [with R = std::experimental::ranges::v1::less<void>&; T = MyType&; U = MyType&]’ | |
concept bool Relation = | |
^~~~~~~~ | |
In file included from include/stl2/algorithm.hpp:90:0, | |
from t.cpp:3: | |
include/stl2/detail/algorithm/sort.hpp:31:4: note: ... and 5 more constraint errors not shown | |
I sort(I first, S sent, Comp comp = Comp{}, Proj proj = Proj{}) | |
^~~~ | |
include/stl2/detail/algorithm/sort.hpp:46:23: note: candidate: template<class Rng, class Comp, class Proj> requires RandomAccessRange<Rng> and Sortable<decltype((std::experimental::ranges::v1::<unnamed>::begin)((declval<R&>)())), Comp, Proj> std::experimental::ranges::v1::safe_iterator_t<Rng> std::experimental::ranges::v1::sort(Rng&&, Comp, Proj) | |
safe_iterator_t<Rng> sort(Rng&& rng, Comp comp = Comp{}, Proj proj = Proj{}) | |
^~~~ | |
include/stl2/detail/algorithm/sort.hpp:46:23: note: template argument deduction/substitution failed: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment