Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stdout:
- sh ./doit.sh
- Makefile:4: recipe for target 'build' failed
- stderr:
- test_31415926.cpp: In function ‘void testConstantOperations()’:
- test_31415926.cpp:280:20: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- unused(a.begin());
- ^
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = int]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:281:18: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- unused(a.end());
- ^
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = int]’
- auto end() {
- ^~~
- poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](int) const [with T = int]’:
- test_31415926.cpp:282:15: required from here
- poly.h:58:20: error: returning reference to temporary [-Werror=return-local-addr]
- return 0;
- ^
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator+=(const Polynomial<T>&) [with T = int]’:
- poly.h:103:19: required from ‘Polynomial<T> operator+(const Polynomial<T>&, const Polynomial<T>&) [with T = int]’
- test_31415926.cpp:275:16: required from here
- poly.h:75:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int, std::allocator<int> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator-=(const Polynomial<T>&) [with T = int]’:
- poly.h:109:19: required from ‘Polynomial<T> operator-(const Polynomial<T>&, const Polynomial<T>&) [with T = int]’
- test_31415926.cpp:276:16: required from here
- poly.h:85:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int, std::allocator<int> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- test_31415926.cpp: In instantiation of ‘void iterator_out(const Polynomial<T>&) [with T = int]’:
- test_31415926.cpp:130:17: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = int]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:292:24: required from here
- test_31415926.cpp:116:81: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = int]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:116:19: error: static assertion failed: Your iterators are not const
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- ^~~
- test_31415926.cpp:118:15: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- ^~
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = int]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:118:34: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = int]’
- auto end() {
- ^~~
- test_31415926.cpp: In instantiation of ‘void iterator_out(const Polynomial<T>&) [with T = long long int]’:
- test_31415926.cpp:130:17: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = long long int]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = long long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:293:30: required from here
- test_31415926.cpp:116:81: error: passing ‘const Polynomial<long long int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = long long int]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:116:19: error: static assertion failed: Your iterators are not const
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- ^~~
- test_31415926.cpp:118:15: error: passing ‘const Polynomial<long long int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- ^~
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = long long int]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:118:34: error: passing ‘const Polynomial<long long int>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = long long int]’
- auto end() {
- ^~~
- poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](int) const [with T = long long int]’:
- test_31415926.cpp:131:33: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = long long int]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = long long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:293:30: required from here
- poly.h:58:20: error: returning reference to temporary [-Werror=return-local-addr]
- return 0;
- ^
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator+=(const Polynomial<T>&) [with T = long long int]’:
- test_31415926.cpp:138:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = long long int]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = long long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:293:30: required from here
- poly.h:75:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long long int, std::allocator<long long int> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator-=(const Polynomial<T>&) [with T = long long int]’:
- test_31415926.cpp:140:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = long long int]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = long long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:293:30: required from here
- poly.h:85:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long long int, std::allocator<long long int> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- test_31415926.cpp: In instantiation of ‘void iterator_out(const Polynomial<T>&) [with T = double]’:
- test_31415926.cpp:130:17: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = double]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:294:27: required from here
- test_31415926.cpp:116:81: error: passing ‘const Polynomial<double>’ as ‘this’ argument discards qualifiers [-fpermissive]
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = double]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:116:19: error: static assertion failed: Your iterators are not const
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- ^~~
- test_31415926.cpp:118:15: error: passing ‘const Polynomial<double>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- ^~
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = double]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:118:34: error: passing ‘const Polynomial<double>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = double]’
- auto end() {
- ^~~
- poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](int) const [with T = double]’:
- test_31415926.cpp:131:33: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = double]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:294:27: required from here
- poly.h:58:20: error: returning reference to temporary [-Werror=return-local-addr]
- return 0;
- ^
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator+=(const Polynomial<T>&) [with T = double]’:
- test_31415926.cpp:138:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = double]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:294:27: required from here
- poly.h:75:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<double, std::allocator<double> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator-=(const Polynomial<T>&) [with T = double]’:
- test_31415926.cpp:140:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = double]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:294:27: required from here
- poly.h:85:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<double, std::allocator<double> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘void Polynomial<T>::clear_zeroes() [with T = NumberWrapper<int>]’:
- poly.h:29:15: required from ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = NumberWrapper<int>]’
- test_31415926.cpp:250:23: required from ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:295:39: required from here
- poly.h:11:33: error: no match for ‘operator==’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<NumberWrapper<int> >, NumberWrapper<int> >::value_type’ {aka ‘NumberWrapper<int>’} and ‘int’)
- if (coefficients[i] == 0) {
- ~~~~~~~~~~~~~~~~^~~~
- poly.h:11:33: note: candidate: ‘operator==(int, int)’ <built-in>
- poly.h:11:33: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<NumberWrapper<int> >, NumberWrapper<int> >::value_type’ {aka ‘NumberWrapper<int>’} to ‘int’
- In file included from test_31415926.cpp:3:
- number_wrapper.h:88:10: note: candidate: ‘bool NumberWrapper<T>::operator==(const NumberWrapper<T>&) const [with T = int]’
- bool operator==(const NumberWrapper& other) const {
- ^~~~~~~~
- number_wrapper.h:88:10: note: no known conversion for argument 1 from ‘int’ to ‘const NumberWrapper<int>&’
- In file included from test_31415926.cpp:4:
- rational.h:114:6: note: candidate: ‘bool operator==(const Rational&, const Rational&)’
- bool operator == (const Rational& p, const Rational& q) {
- ^~~~~~~~
- rational.h:114:6: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<NumberWrapper<int> >, NumberWrapper<int> >::value_type’ {aka ‘NumberWrapper<int>’} to ‘const Rational&’
- test_31415926.cpp: In instantiation of ‘void iterator_out(const Polynomial<T>&) [with T = NumberWrapper<int>]’:
- test_31415926.cpp:130:17: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<int>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:295:39: required from here
- test_31415926.cpp:116:81: error: passing ‘const Polynomial<NumberWrapper<int> >’ as ‘this’ argument discards qualifiers [-fpermissive]
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = NumberWrapper<int>]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:116:19: error: static assertion failed: Your iterators are not const
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- ^~~
- test_31415926.cpp:118:15: error: passing ‘const Polynomial<NumberWrapper<int> >’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- ^~
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = NumberWrapper<int>]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:118:34: error: passing ‘const Polynomial<NumberWrapper<int> >’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = NumberWrapper<int>]’
- auto end() {
- ^~~
- poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](int) const [with T = NumberWrapper<int>]’:
- test_31415926.cpp:131:33: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<int>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:295:39: required from here
- poly.h:58:20: error: invalid initialization of reference of type ‘const NumberWrapper<int>&’ from expression of type ‘int’
- return 0;
- ^
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator+=(const Polynomial<T>&) [with T = NumberWrapper<int>]’:
- test_31415926.cpp:138:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<int>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:295:39: required from here
- poly.h:75:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<NumberWrapper<int>, std::allocator<NumberWrapper<int> > >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator-=(const Polynomial<T>&) [with T = NumberWrapper<int>]’:
- test_31415926.cpp:140:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<int>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:295:39: required from here
- poly.h:85:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<NumberWrapper<int>, std::allocator<NumberWrapper<int> > >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘void Polynomial<T>::clear_zeroes() [with T = NumberWrapper<double>]’:
- poly.h:29:15: required from ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = NumberWrapper<double>]’
- test_31415926.cpp:250:23: required from ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:296:42: required from here
- poly.h:11:33: error: no match for ‘operator==’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<NumberWrapper<double> >, NumberWrapper<double> >::value_type’ {aka ‘NumberWrapper<double>’} and ‘int’)
- if (coefficients[i] == 0) {
- ~~~~~~~~~~~~~~~~^~~~
- poly.h:11:33: note: candidate: ‘operator==(double, int)’ <built-in>
- poly.h:11:33: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<NumberWrapper<double> >, NumberWrapper<double> >::value_type’ {aka ‘NumberWrapper<double>’} to ‘double’
- In file included from test_31415926.cpp:3:
- number_wrapper.h:88:10: note: candidate: ‘bool NumberWrapper<T>::operator==(const NumberWrapper<T>&) const [with T = double]’
- bool operator==(const NumberWrapper& other) const {
- ^~~~~~~~
- number_wrapper.h:88:10: note: no known conversion for argument 1 from ‘int’ to ‘const NumberWrapper<double>&’
- In file included from test_31415926.cpp:4:
- rational.h:114:6: note: candidate: ‘bool operator==(const Rational&, const Rational&)’
- bool operator == (const Rational& p, const Rational& q) {
- ^~~~~~~~
- rational.h:114:6: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<NumberWrapper<double> >, NumberWrapper<double> >::value_type’ {aka ‘NumberWrapper<double>’} to ‘const Rational&’
- test_31415926.cpp: In instantiation of ‘void iterator_out(const Polynomial<T>&) [with T = NumberWrapper<double>]’:
- test_31415926.cpp:130:17: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<double>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:296:42: required from here
- test_31415926.cpp:116:81: error: passing ‘const Polynomial<NumberWrapper<double> >’ as ‘this’ argument discards qualifiers [-fpermissive]
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = NumberWrapper<double>]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:116:19: error: static assertion failed: Your iterators are not const
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- ^~~
- test_31415926.cpp:118:15: error: passing ‘const Polynomial<NumberWrapper<double> >’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- ^~
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = NumberWrapper<double>]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:118:34: error: passing ‘const Polynomial<NumberWrapper<double> >’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = NumberWrapper<double>]’
- auto end() {
- ^~~
- poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](int) const [with T = NumberWrapper<double>]’:
- test_31415926.cpp:131:33: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<double>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:296:42: required from here
- poly.h:58:20: error: invalid initialization of reference of type ‘const NumberWrapper<double>&’ from expression of type ‘int’
- return 0;
- ^
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator+=(const Polynomial<T>&) [with T = NumberWrapper<double>]’:
- test_31415926.cpp:138:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<double>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:296:42: required from here
- poly.h:75:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<NumberWrapper<double>, std::allocator<NumberWrapper<double> > >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator-=(const Polynomial<T>&) [with T = NumberWrapper<double>]’:
- test_31415926.cpp:140:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = NumberWrapper<double>]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:296:42: required from here
- poly.h:85:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<NumberWrapper<double>, std::allocator<NumberWrapper<double> > >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- test_31415926.cpp: In instantiation of ‘void iterator_out(const Polynomial<T>&) [with T = Rational]’:
- test_31415926.cpp:130:17: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = Rational]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = Rational; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:297:29: required from here
- test_31415926.cpp:116:81: error: passing ‘const Polynomial<Rational>’ as ‘this’ argument discards qualifiers [-fpermissive]
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = Rational]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:116:19: error: static assertion failed: Your iterators are not const
- static_assert(std::is_same<const T, typename std::remove_reference<decltype(*p.begin())>::type>::value,
- ^~~
- test_31415926.cpp:118:15: error: passing ‘const Polynomial<Rational>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- ^~
- In file included from test_31415926.cpp:2:
- poly.h:91:10: note: in call to ‘auto Polynomial<T>::begin() [with T = Rational]’
- auto begin() {
- ^~~~~
- test_31415926.cpp:118:34: error: passing ‘const Polynomial<Rational>’ as ‘this’ argument discards qualifiers [-fpermissive]
- for (auto it = p.begin(); it != p.end(); ++it)
- In file included from test_31415926.cpp:2:
- poly.h:95:10: note: in call to ‘auto Polynomial<T>::end() [with T = Rational]’
- auto end() {
- ^~~
- poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](int) const [with T = Rational]’:
- test_31415926.cpp:131:33: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = Rational]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = Rational; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:297:29: required from here
- poly.h:58:20: error: returning reference to temporary [-Werror=return-local-addr]
- return 0;
- ^
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator+=(const Polynomial<T>&) [with T = Rational]’:
- test_31415926.cpp:138:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = Rational]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = Rational; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:297:29: required from here
- poly.h:75:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Rational, std::allocator<Rational> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- poly.h: In instantiation of ‘Polynomial<T>& Polynomial<T>::operator-=(const Polynomial<T>&) [with T = Rational]’:
- test_31415926.cpp:140:7: required from ‘void first_group(Polynomial<T>, Polynomial<T>) [with T = Rational]’
- test_31415926.cpp:253:24: required from ‘void runTests(const string&) [with T = Rational; std::__cxx11::string = std::__cxx11::basic_string<char>]’
- test_31415926.cpp:297:29: required from here
- poly.h:85:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Rational, std::allocator<Rational> >::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < p.GetCoeff().size(); ++i) {
- cc1plus: all warnings being treated as errors
- make: *** [build] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement