Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.70 KB | None | 0 0
  1. stdout:
  2. sh ./doit.sh
  3. Makefile:4: recipe for target 'build' failed
  4.  
  5.  
  6. stderr:
  7. test_31415926.cpp: In function ‘void testConstantOperations()’:
  8. test_31415926.cpp:280:20: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
  9. unused(a.begin());
  10. ^
  11. In file included from test_31415926.cpp:2:
  12. poly.h:38:45: note: in call to ‘typename std::vector<T>::const_iterator Polynomial<T>::begin() [with T = int; typename std::vector<T>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int, std::allocator<int> > >]’
  13. typename std::vector<T>::const_iterator begin() {
  14. ^~~~~
  15. test_31415926.cpp:281:18: error: passing ‘const Polynomial<int>’ as ‘this’ argument discards qualifiers [-fpermissive]
  16. unused(a.end());
  17. ^
  18. In file included from test_31415926.cpp:2:
  19. poly.h:43:45: note: in call to ‘typename std::vector<T>::const_iterator Polynomial<T>::end() [with T = int; typename std::vector<T>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int, std::allocator<int> > >]’
  20. typename std::vector<T>::const_iterator end() {
  21. ^~~
  22. poly.h: In instantiation of ‘Polynomial<T> Polynomial<T>::operator+(const Polynomial<T>&) const [with T = int]’:
  23. test_31415926.cpp:275:16: required from here
  24. poly.h:99:30: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  25. for (size_t i = 0; i < new_d1.Degree() + 1; ++i) {
  26. ~~^~~~~~~~~~~~~~~~~~~~~
  27. poly.h:101:19: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  28. if (i > new_d2.Degree()) {
  29. poly.h: In instantiation of ‘Polynomial<T> Polynomial<T>::operator-(const Polynomial<T>&) const [with T = int]’:
  30. test_31415926.cpp:276:16: required from here
  31. poly.h:147:30: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  32. for (size_t i = 0; i < new_d1.Degree() + 1; ++i) {
  33. ~~^~~~~~~~~~~~~~~~~~~~~
  34. poly.h:149:19: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  35. if (i > new_d2.Degree()) {
  36. poly.h: In instantiation of ‘bool Polynomial<T>::operator==(const Polynomial<T>&) const [with T = int]’:
  37. test_31415926.cpp:277:17: required from here
  38. poly.h:72:30: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  39. for (size_t i = 0; i < Degree() + 1; ++i) {
  40. ~~^~~~~~~~~~~~~~
  41. poly.h: In instantiation of ‘const T& Polynomial<T>::operator[](size_t) const [with T = int; size_t = long unsigned int]’:
  42. test_31415926.cpp:282:15: required from here
  43. poly.h:57:15: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  44. if (i > Degree()) {
  45. poly.h:58:20: error: returning reference to temporary [-Werror=return-local-addr]
  46. return 0;
  47. ^
  48. test_31415926.cpp: In instantiation of ‘void runTests(const string&) [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
  49. test_31415926.cpp:292:24: required from here
  50. test_31415926.cpp:250:33: error: no matching function for call to ‘Polynomial<int>::Polynomial(std::__cxx11::list<int, std::allocator<int> >::iterator, std::__cxx11::list<int, std::allocator<int> >::iterator)’
  51. Polynomial<T> p(first), q(second.begin(), second.end());
  52. ^
  53. In file included from test_31415926.cpp:2:
  54. poly.h:24:5: note: candidate: ‘Polynomial<T>::Polynomial(typename std::vector<T>::iterator, typename std::vector<T>::iterator) [with T = int; typename std::vector<T>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]’
  55. Polynomial(typename std::vector<T>::iterator d, typename std::vector<T>::iterator g) {
  56. ^~~~~~~~~~
  57. poly.h:24:5: note: no known conversion for argument 1 from ‘std::__cxx11::list<int, std::allocator<int> >::iterator’ {aka ‘std::_List_iterator<int>’} to ‘std::vector<int, std::allocator<int> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >’}
  58. poly.h:19:5: note: candidate: ‘Polynomial<T>::Polynomial(const T&) [with T = int]’
  59. Polynomial(const T& num) {
  60. ^~~~~~~~~~
  61. poly.h:19:5: note: candidate expects 1 argument, 2 provided
  62. poly.h:14:5: note: candidate: ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = int]’
  63. Polynomial(const std::vector<T>& d) {
  64. ^~~~~~~~~~
  65. poly.h:14:5: note: candidate expects 1 argument, 2 provided
  66. poly.h:10:5: note: candidate: ‘Polynomial<T>::Polynomial() [with T = int]’
  67. Polynomial() {
  68. ^~~~~~~~~~
  69. poly.h:10:5: note: candidate expects 0 arguments, 2 provided
  70. poly.h:5:7: note: candidate: ‘Polynomial<int>::Polynomial(const Polynomial<int>&)’
  71. class Polynomial {
  72. ^~~~~~~~~~
  73. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  74. poly.h:5:7: note: candidate: ‘Polynomial<int>::Polynomial(Polynomial<int>&&)’
  75. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  76. test_31415926.cpp: In instantiation of ‘void runTests(const string&) [with T = long long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
  77. test_31415926.cpp:293:30: required from here
  78. test_31415926.cpp:250:33: error: no matching function for call to ‘Polynomial<long long int>::Polynomial(std::__cxx11::list<long long int, std::allocator<long long int> >::iterator, std::__cxx11::list<long long int, std::allocator<long long int> >::iterator)’
  79. Polynomial<T> p(first), q(second.begin(), second.end());
  80. ^
  81. In file included from test_31415926.cpp:2:
  82. poly.h:24:5: note: candidate: ‘Polynomial<T>::Polynomial(typename std::vector<T>::iterator, typename std::vector<T>::iterator) [with T = long long int; typename std::vector<T>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >]’
  83. Polynomial(typename std::vector<T>::iterator d, typename std::vector<T>::iterator g) {
  84. ^~~~~~~~~~
  85. poly.h:24:5: note: no known conversion for argument 1 from ‘std::__cxx11::list<long long int, std::allocator<long long int> >::iterator’ {aka ‘std::_List_iterator<long long int>’} to ‘std::vector<long long int, std::allocator<long long int> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int, std::allocator<long long int> > >’}
  86. poly.h:19:5: note: candidate: ‘Polynomial<T>::Polynomial(const T&) [with T = long long int]’
  87. Polynomial(const T& num) {
  88. ^~~~~~~~~~
  89. poly.h:19:5: note: candidate expects 1 argument, 2 provided
  90. poly.h:14:5: note: candidate: ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = long long int]’
  91. Polynomial(const std::vector<T>& d) {
  92. ^~~~~~~~~~
  93. poly.h:14:5: note: candidate expects 1 argument, 2 provided
  94. poly.h:10:5: note: candidate: ‘Polynomial<T>::Polynomial() [with T = long long int]’
  95. Polynomial() {
  96. ^~~~~~~~~~
  97. poly.h:10:5: note: candidate expects 0 arguments, 2 provided
  98. poly.h:5:7: note: candidate: ‘Polynomial<long long int>::Polynomial(const Polynomial<long long int>&)’
  99. class Polynomial {
  100. ^~~~~~~~~~
  101. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  102. poly.h:5:7: note: candidate: ‘Polynomial<long long int>::Polynomial(Polynomial<long long int>&&)’
  103. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  104. test_31415926.cpp: In instantiation of ‘void runTests(const string&) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
  105. test_31415926.cpp:294:27: required from here
  106. test_31415926.cpp:250:33: error: no matching function for call to ‘Polynomial<double>::Polynomial(std::__cxx11::list<double, std::allocator<double> >::iterator, std::__cxx11::list<double, std::allocator<double> >::iterator)’
  107. Polynomial<T> p(first), q(second.begin(), second.end());
  108. ^
  109. In file included from test_31415926.cpp:2:
  110. poly.h:24:5: note: candidate: ‘Polynomial<T>::Polynomial(typename std::vector<T>::iterator, typename std::vector<T>::iterator) [with T = double; typename std::vector<T>::iterator = __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >]’
  111. Polynomial(typename std::vector<T>::iterator d, typename std::vector<T>::iterator g) {
  112. ^~~~~~~~~~
  113. poly.h:24:5: note: no known conversion for argument 1 from ‘std::__cxx11::list<double, std::allocator<double> >::iterator’ {aka ‘std::_List_iterator<double>’} to ‘std::vector<double, std::allocator<double> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >’}
  114. poly.h:19:5: note: candidate: ‘Polynomial<T>::Polynomial(const T&) [with T = double]’
  115. Polynomial(const T& num) {
  116. ^~~~~~~~~~
  117. poly.h:19:5: note: candidate expects 1 argument, 2 provided
  118. poly.h:14:5: note: candidate: ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = double]’
  119. Polynomial(const std::vector<T>& d) {
  120. ^~~~~~~~~~
  121. poly.h:14:5: note: candidate expects 1 argument, 2 provided
  122. poly.h:10:5: note: candidate: ‘Polynomial<T>::Polynomial() [with T = double]’
  123. Polynomial() {
  124. ^~~~~~~~~~
  125. poly.h:10:5: note: candidate expects 0 arguments, 2 provided
  126. poly.h:5:7: note: candidate: ‘Polynomial<double>::Polynomial(const Polynomial<double>&)’
  127. class Polynomial {
  128. ^~~~~~~~~~
  129. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  130. poly.h:5:7: note: candidate: ‘Polynomial<double>::Polynomial(Polynomial<double>&&)’
  131. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  132. test_31415926.cpp: In instantiation of ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
  133. test_31415926.cpp:295:39: required from here
  134. test_31415926.cpp:250:33: error: no matching function for call to ‘Polynomial<NumberWrapper<int> >::Polynomial(std::__cxx11::list<NumberWrapper<int>, std::allocator<NumberWrapper<int> > >::iterator, std::__cxx11::list<NumberWrapper<int>, std::allocator<NumberWrapper<int> > >::iterator)’
  135. Polynomial<T> p(first), q(second.begin(), second.end());
  136. ^
  137. In file included from test_31415926.cpp:2:
  138. poly.h:24:5: note: candidate: ‘Polynomial<T>::Polynomial(typename std::vector<T>::iterator, typename std::vector<T>::iterator) [with T = NumberWrapper<int>; typename std::vector<T>::iterator = __gnu_cxx::__normal_iterator<NumberWrapper<int>*, std::vector<NumberWrapper<int>, std::allocator<NumberWrapper<int> > > >]’
  139. Polynomial(typename std::vector<T>::iterator d, typename std::vector<T>::iterator g) {
  140. ^~~~~~~~~~
  141. poly.h:24:5: note: no known conversion for argument 1 from ‘std::__cxx11::list<NumberWrapper<int>, std::allocator<NumberWrapper<int> > >::iterator’ {aka ‘std::_List_iterator<NumberWrapper<int> >’} to ‘std::vector<NumberWrapper<int>, std::allocator<NumberWrapper<int> > >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<NumberWrapper<int>*, std::vector<NumberWrapper<int>, std::allocator<NumberWrapper<int> > > >’}
  142. poly.h:19:5: note: candidate: ‘Polynomial<T>::Polynomial(const T&) [with T = NumberWrapper<int>]’
  143. Polynomial(const T& num) {
  144. ^~~~~~~~~~
  145. poly.h:19:5: note: candidate expects 1 argument, 2 provided
  146. poly.h:14:5: note: candidate: ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = NumberWrapper<int>]’
  147. Polynomial(const std::vector<T>& d) {
  148. ^~~~~~~~~~
  149. poly.h:14:5: note: candidate expects 1 argument, 2 provided
  150. poly.h:10:5: note: candidate: ‘Polynomial<T>::Polynomial() [with T = NumberWrapper<int>]’
  151. Polynomial() {
  152. ^~~~~~~~~~
  153. poly.h:10:5: note: candidate expects 0 arguments, 2 provided
  154. poly.h:5:7: note: candidate: ‘Polynomial<NumberWrapper<int> >::Polynomial(const Polynomial<NumberWrapper<int> >&)’
  155. class Polynomial {
  156. ^~~~~~~~~~
  157. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  158. poly.h:5:7: note: candidate: ‘Polynomial<NumberWrapper<int> >::Polynomial(Polynomial<NumberWrapper<int> >&&)’
  159. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  160. test_31415926.cpp: In instantiation of ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
  161. test_31415926.cpp:296:42: required from here
  162. test_31415926.cpp:250:33: error: no matching function for call to ‘Polynomial<NumberWrapper<double> >::Polynomial(std::__cxx11::list<NumberWrapper<double>, std::allocator<NumberWrapper<double> > >::iterator, std::__cxx11::list<NumberWrapper<double>, std::allocator<NumberWrapper<double> > >::iterator)’
  163. Polynomial<T> p(first), q(second.begin(), second.end());
  164. ^
  165. In file included from test_31415926.cpp:2:
  166. poly.h:24:5: note: candidate: ‘Polynomial<T>::Polynomial(typename std::vector<T>::iterator, typename std::vector<T>::iterator) [with T = NumberWrapper<double>; typename std::vector<T>::iterator = __gnu_cxx::__normal_iterator<NumberWrapper<double>*, std::vector<NumberWrapper<double>, std::allocator<NumberWrapper<double> > > >]’
  167. Polynomial(typename std::vector<T>::iterator d, typename std::vector<T>::iterator g) {
  168. ^~~~~~~~~~
  169. poly.h:24:5: note: no known conversion for argument 1 from ‘std::__cxx11::list<NumberWrapper<double>, std::allocator<NumberWrapper<double> > >::iterator’ {aka ‘std::_List_iterator<NumberWrapper<double> >’} to ‘std::vector<NumberWrapper<double>, std::allocator<NumberWrapper<double> > >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<NumberWrapper<double>*, std::vector<NumberWrapper<double>, std::allocator<NumberWrapper<double> > > >’}
  170. poly.h:19:5: note: candidate: ‘Polynomial<T>::Polynomial(const T&) [with T = NumberWrapper<double>]’
  171. Polynomial(const T& num) {
  172. ^~~~~~~~~~
  173. poly.h:19:5: note: candidate expects 1 argument, 2 provided
  174. poly.h:14:5: note: candidate: ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = NumberWrapper<double>]’
  175. Polynomial(const std::vector<T>& d) {
  176. ^~~~~~~~~~
  177. poly.h:14:5: note: candidate expects 1 argument, 2 provided
  178. poly.h:10:5: note: candidate: ‘Polynomial<T>::Polynomial() [with T = NumberWrapper<double>]’
  179. Polynomial() {
  180. ^~~~~~~~~~
  181. poly.h:10:5: note: candidate expects 0 arguments, 2 provided
  182. poly.h:5:7: note: candidate: ‘Polynomial<NumberWrapper<double> >::Polynomial(const Polynomial<NumberWrapper<double> >&)’
  183. class Polynomial {
  184. ^~~~~~~~~~
  185. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  186. poly.h:5:7: note: candidate: ‘Polynomial<NumberWrapper<double> >::Polynomial(Polynomial<NumberWrapper<double> >&&)’
  187. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  188. test_31415926.cpp: In instantiation of ‘void runTests(const string&) [with T = Rational; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
  189. test_31415926.cpp:297:29: required from here
  190. test_31415926.cpp:250:33: error: no matching function for call to ‘Polynomial<Rational>::Polynomial(std::__cxx11::list<Rational, std::allocator<Rational> >::iterator, std::__cxx11::list<Rational, std::allocator<Rational> >::iterator)’
  191. Polynomial<T> p(first), q(second.begin(), second.end());
  192. ^
  193. In file included from test_31415926.cpp:2:
  194. poly.h:24:5: note: candidate: ‘Polynomial<T>::Polynomial(typename std::vector<T>::iterator, typename std::vector<T>::iterator) [with T = Rational; typename std::vector<T>::iterator = __gnu_cxx::__normal_iterator<Rational*, std::vector<Rational, std::allocator<Rational> > >]’
  195. Polynomial(typename std::vector<T>::iterator d, typename std::vector<T>::iterator g) {
  196. ^~~~~~~~~~
  197. poly.h:24:5: note: no known conversion for argument 1 from ‘std::__cxx11::list<Rational, std::allocator<Rational> >::iterator’ {aka ‘std::_List_iterator<Rational>’} to ‘std::vector<Rational, std::allocator<Rational> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<Rational*, std::vector<Rational, std::allocator<Rational> > >’}
  198. poly.h:19:5: note: candidate: ‘Polynomial<T>::Polynomial(const T&) [with T = Rational]’
  199. Polynomial(const T& num) {
  200. ^~~~~~~~~~
  201. poly.h:19:5: note: candidate expects 1 argument, 2 provided
  202. poly.h:14:5: note: candidate: ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = Rational]’
  203. Polynomial(const std::vector<T>& d) {
  204. ^~~~~~~~~~
  205. poly.h:14:5: note: candidate expects 1 argument, 2 provided
  206. poly.h:10:5: note: candidate: ‘Polynomial<T>::Polynomial() [with T = Rational]’
  207. Polynomial() {
  208. ^~~~~~~~~~
  209. poly.h:10:5: note: candidate expects 0 arguments, 2 provided
  210. poly.h:5:7: note: candidate: ‘Polynomial<Rational>::Polynomial(const Polynomial<Rational>&)’
  211. class Polynomial {
  212. ^~~~~~~~~~
  213. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  214. poly.h:5:7: note: candidate: ‘Polynomial<Rational>::Polynomial(Polynomial<Rational>&&)’
  215. poly.h:5:7: note: candidate expects 1 argument, 2 provided
  216. poly.h: In instantiation of ‘T& Polynomial<T>::operator[](size_t) [with T = int; size_t = long unsigned int]’:
  217. poly.h:100:28: required from ‘Polynomial<T> Polynomial<T>::operator+(const Polynomial<T>&) const [with T = int]’
  218. test_31415926.cpp:275:16: required from here
  219. poly.h:49:15: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
  220. if (i > Degree()) {
  221. poly.h: In instantiation of ‘void Polynomial<T>::updeted() [with T = NumberWrapper<int>]’:
  222. poly.h:16:9: required from ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = NumberWrapper<int>]’
  223. test_31415926.cpp:250:23: required from ‘void runTests(const string&) [with T = NumberWrapper<int>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
  224. test_31415926.cpp:295:39: required from here
  225. poly.h:33:59: 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’)
  226. while ((!(data.empty())) && data[data.size() - 1] == 0) {
  227. ~~~~~~~~~~~~~~~~~~~~~~^~~~
  228. poly.h:33:59: note: candidate: ‘operator==(int, int)’ <built-in>
  229. poly.h:33:59: 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’
  230. In file included from test_31415926.cpp:3:
  231. number_wrapper.h:88:10: note: candidate: ‘bool NumberWrapper<T>::operator==(const NumberWrapper<T>&) const [with T = int]’
  232. bool operator==(const NumberWrapper& other) const {
  233. ^~~~~~~~
  234. number_wrapper.h:88:10: note: no known conversion for argument 1 from ‘int’ to ‘const NumberWrapper<int>&’
  235. In file included from test_31415926.cpp:4:
  236. rational.h:114:6: note: candidate: ‘bool operator==(const Rational&, const Rational&)’
  237. bool operator == (const Rational& p, const Rational& q) {
  238. ^~~~~~~~
  239. 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&’
  240. In file included from test_31415926.cpp:2:
  241. poly.h: In instantiation of ‘void Polynomial<T>::updeted() [with T = NumberWrapper<double>]’:
  242. poly.h:16:9: required from ‘Polynomial<T>::Polynomial(const std::vector<T>&) [with T = NumberWrapper<double>]’
  243. test_31415926.cpp:250:23: required from ‘void runTests(const string&) [with T = NumberWrapper<double>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
  244. test_31415926.cpp:296:42: required from here
  245. poly.h:33:59: 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’)
  246. while ((!(data.empty())) && data[data.size() - 1] == 0) {
  247. ~~~~~~~~~~~~~~~~~~~~~~^~~~
  248. poly.h:33:59: note: candidate: ‘operator==(double, int)’ <built-in>
  249. poly.h:33:59: 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’
  250. In file included from test_31415926.cpp:3:
  251. number_wrapper.h:88:10: note: candidate: ‘bool NumberWrapper<T>::operator==(const NumberWrapper<T>&) const [with T = double]’
  252. bool operator==(const NumberWrapper& other) const {
  253. ^~~~~~~~
  254. number_wrapper.h:88:10: note: no known conversion for argument 1 from ‘int’ to ‘const NumberWrapper<double>&’
  255. In file included from test_31415926.cpp:4:
  256. rational.h:114:6: note: candidate: ‘bool operator==(const Rational&, const Rational&)’
  257. bool operator == (const Rational& p, const Rational& q) {
  258. ^~~~~~~~
  259. 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&’
  260. cc1plus: all warnings being treated as errors
  261. make: *** [build] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement