Advertisement
Guest User

Untitled

a guest
Jul 18th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.85 KB | None | 0 0
  1. TEST_FMPZXX_INIT_WRONG
  2. {
  3. newtype n;
  4. fmpzxx a(n);
  5. }
  6. Compiler error output is 29 line(s), 2211 characters
  7. ------START COMPILER ERROR OUTPUT-------
  8. In file included from t-compiler-errors.cc:31:
  9. /home/ness/src/flint/fmpzxx.h:158:9: error: no matching member function for call to 'init'
  10. init(t);
  11. ^~~~
  12. /home/ness/src/flint/flintxx/expression.h:154:16: note: in instantiation of function template specialization 'flint::detail::fmpz_data::fmpz_data<newtype>' requested here
  13. return data_t(t);
  14. ^
  15. /home/ness/src/flint/flintxx/expression.h:194:16: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::detail::fmpz_data>::get_data<newtype>' requested here
  16. : data(get_data(t)) {}
  17. ^
  18. /home/ness/src/flint/fmpzxx.h:51:5: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::detail::fmpz_data>::expression<newtype>' requested here
  19. FLINTXX_DEFINE_CTORS(fmpzxx_expression)
  20. ^
  21. /home/ness/src/flint/flintxx/flint_classes.h:252:11: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
  22. : base_t(t) {} \
  23. ^
  24. t-compiler-errors.cc:44:16: note: in instantiation of function template specialization 'flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>::fmpzxx_expression<newtype>' requested here
  25. fmpzxx a(n);
  26. ^
  27. /home/ness/src/flint/fmpzxx.h:173:10: note: candidate function not viable: no known conversion from 'const newtype' to 'const fmpzxx_srcref' (aka 'const fmpzxx_expression<operations::immediate, flint_classes::srcref_data<fmpzxx, fmpzxx_ref, fmpz> >') for 1st argument
  28. void init(const fmpzxx_srcref& r)
  29. ^
  30. /home/ness/src/flint/fmpzxx.h:162:28: note: candidate template ignored: disabled by 'enable_if' [with T = newtype]
  31. typename mp::enable_if<traits::is_unsigned_integer<T> >::type init(T t)
  32. ^
  33. /home/ness/src/flint/fmpzxx.h:167:28: note: candidate template ignored: disabled by 'enable_if' [with T = newtype]
  34. typename mp::enable_if<traits::is_signed_integer<T> >::type init(T t)
  35. ^
  36. 1 error generated.
  37. ------END COMPILER ERROR OUTPUT---------
  38.  
  39.  
  40. TEST_FMPZXX_INIT_2
  41. {
  42. fmpzxx a(3, 4);
  43. }
  44. Compiler error output is 27 line(s), 1767 characters
  45. ------START COMPILER ERROR OUTPUT-------
  46. In file included from t-compiler-errors.cc:31:
  47. In file included from /home/ness/src/flint/fmpzxx.h:32:
  48. /home/ness/src/flint/flintxx/expression.h:198:11: error: no matching constructor for initialization of 'flint::detail::fmpz_data'
  49. : data(t, u) {}
  50. ^ ~~~~
  51. /home/ness/src/flint/fmpzxx.h:51:5: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::detail::fmpz_data>::expression<int, int>' requested here
  52. FLINTXX_DEFINE_CTORS(fmpzxx_expression)
  53. ^
  54. /home/ness/src/flint/flintxx/flint_classes.h:262:36: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
  55. name(const T& t, const U& u) : base_t(t, u) {}
  56. ^
  57. t-compiler-errors.cc:49:16: note: in instantiation of function template specialization 'flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>::fmpzxx_expression<int, int>' requested here
  58. fmpzxx a(3, 4);
  59. ^
  60. /home/ness/src/flint/fmpzxx.h:156:5: note: candidate constructor template not viable: requires single argument 't', but 2 arguments were provided
  61. fmpz_data(const T& t)
  62. ^
  63. /home/ness/src/flint/fmpzxx.h:145:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
  64. fmpz_data() {fmpz_init(inner);}
  65. ^
  66. /home/ness/src/flint/fmpzxx.h:147:5: note: candidate constructor not viable: requires single argument 'o', but 2 arguments were provided
  67. fmpz_data(const fmpz_data& o) {fmpz_init_set(inner, o.inner);}
  68. ^
  69. /home/ness/src/flint/fmpzxx.h:149:5: note: candidate constructor not viable: requires single argument 'str', but 2 arguments were provided
  70. fmpz_data(const char* str)
  71. ^
  72. 1 error generated.
  73. ------END COMPILER ERROR OUTPUT---------
  74.  
  75.  
  76. TEST_FMPZXX_ASSIGN_WRONG
  77. {
  78. fmpzxx a;
  79. newtype n;
  80. a = n;
  81. }
  82. Compiler error output is 15 line(s), 1159 characters
  83. ------START COMPILER ERROR OUTPUT-------
  84. In file included from t-compiler-errors.cc:31:
  85. In file included from /home/ness/src/flint/fmpzxx.h:32:
  86. /home/ness/src/flint/flintxx/expression.h:260:42: error: no member named 'doit' in 'flint::rules::assignment<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, newtype, void>'
  87. rules::assignment<derived_t, T>::doit(downcast(), t);
  88. ^
  89. /home/ness/src/flint/fmpzxx.h:50:5: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::detail::fmpz_data>::set<newtype>' requested here
  90. FLINTXX_DEFINE_BASICS(fmpzxx_expression)
  91. ^
  92. /home/ness/src/flint/flintxx/flint_classes.h:232:15: note: expanded from macro 'FLINTXX_DEFINE_BASICS'
  93. this->set(t); \
  94. ^
  95. t-compiler-errors.cc:56:11: note: in instantiation of function template specialization 'flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>::operator=<newtype>' requested here
  96. a = n;
  97. ^
  98. 1 error generated.
  99. ------END COMPILER ERROR OUTPUT---------
  100.  
  101.  
  102. TEST_FMPZXX_CONVERT_WRONG
  103. {
  104. fmpzxx a;
  105. a.to<newtype>();
  106. }
  107. Compiler error output is 17 line(s), 1498 characters
  108. ------START COMPILER ERROR OUTPUT-------
  109. In file included from t-compiler-errors.cc:31:
  110. In file included from /home/ness/src/flint/fmpzxx.h:31:
  111. In file included from /home/ness/src/flint/flintxx/evaluation_tools.h:37:
  112. /home/ness/src/flint/flintxx/rules.h:74:16: error: no matching conversion for functional-style cast from 'const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>' to 'newtype'
  113. return To(from);
  114. ^~~~~~~
  115. /home/ness/src/flint/flintxx/expression.h:230:51: note: in instantiation of member function 'flint::rules::conversion<newtype, flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, void>::get' requested here
  116. return rules::conversion<T, evaluated_t>::get(evaluate());
  117. ^
  118. t-compiler-errors.cc:62:11: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::detail::fmpz_data>::to<newtype>' requested here
  119. a.to<newtype>();
  120. ^
  121. t-compiler-errors.cc:33:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>' to 'const newtype' for 1st argument
  122. struct newtype { };
  123. ^
  124. t-compiler-errors.cc:33:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
  125. 1 error generated.
  126. ------END COMPILER ERROR OUTPUT---------
  127.  
  128.  
  129. TEST_FMPZXX_REF_INIT_WRONG_1
  130. {
  131. const fmpzxx a;
  132. fmpzxx_ref ar(a);
  133. }
  134. Compiler error output is 27 line(s), 3051 characters
  135. ------START COMPILER ERROR OUTPUT-------
  136. In file included from t-compiler-errors.cc:31:
  137. In file included from /home/ness/src/flint/fmpzxx.h:32:
  138. /home/ness/src/flint/flintxx/expression.h:148:16: error: no matching conversion for functional-style cast from 'const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>' to 'data_t' (aka 'flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long>')
  139. return data_t(t);
  140. ^~~~~~~~
  141. /home/ness/src/flint/flintxx/expression.h:190:16: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >::get_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data> >' requested here
  142. : data(get_data(t)) {}
  143. ^
  144. /home/ness/src/flint/fmpzxx.h:51:5: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >::expression<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data> >' requested here
  145. FLINTXX_DEFINE_CTORS(fmpzxx_expression)
  146. ^
  147. /home/ness/src/flint/flintxx/flint_classes.h:256:11: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
  148. : base_t(t) {} \
  149. ^
  150. t-compiler-errors.cc:68:20: note: in instantiation of function template specialization 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >::fmpzxx_expression<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data> >' requested here
  151. fmpzxx_ref ar(a);
  152. ^
  153. /home/ness/src/flint/flintxx/flint_classes.h:39:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>' to 'const flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long>' for 1st argument
  154. struct ref_data
  155. ^
  156. /home/ness/src/flint/flintxx/flint_classes.h:49:5: note: candidate constructor not viable: 1st argument ('const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>') would lose const qualifier
  157. ref_data(Wrapped& o) : inner(o._data().inner) {}
  158. ^
  159. /home/ness/src/flint/flintxx/flint_classes.h:54:5: note: candidate constructor not viable: no known conversion from 'const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>' to 'long *' for 1st argument
  160. ref_data(Inner* fp) : inner(fp) {}
  161. ^
  162. 1 error generated.
  163. ------END COMPILER ERROR OUTPUT---------
  164.  
  165.  
  166. TEST_FMPZXX_REF_INIT_WRONG_2
  167. {
  168. const fmpzxx a;
  169. fmpzxx_srcref asr(a);
  170. fmpzxx_ref ar(asr);
  171. }
  172. Compiler error output is 27 line(s), 5042 characters
  173. ------START COMPILER ERROR OUTPUT-------
  174. In file included from t-compiler-errors.cc:31:
  175. In file included from /home/ness/src/flint/fmpzxx.h:32:
  176. /home/ness/src/flint/flintxx/expression.h:154:16: error: no matching conversion for functional-style cast from 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >' to 'data_t' (aka 'flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long>')
  177. return data_t(t);
  178. ^~~~~~~~
  179. /home/ness/src/flint/flintxx/expression.h:194:16: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >::get_data<flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> > >' requested here
  180. : data(get_data(t)) {}
  181. ^
  182. /home/ness/src/flint/fmpzxx.h:51:5: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >::expression<flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> > >' requested here
  183. FLINTXX_DEFINE_CTORS(fmpzxx_expression)
  184. ^
  185. /home/ness/src/flint/flintxx/flint_classes.h:252:11: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
  186. : base_t(t) {} \
  187. ^
  188. t-compiler-errors.cc:75:20: note: in instantiation of function template specialization 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >::fmpzxx_expression<flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> > >' requested here
  189. fmpzxx_ref ar(asr);
  190. ^
  191. /home/ness/src/flint/flintxx/flint_classes.h:39:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >' to 'const flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long>' for 1st argument
  192. struct ref_data
  193. ^
  194. /home/ness/src/flint/flintxx/flint_classes.h:49:5: note: candidate constructor not viable: no known conversion from 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >' to 'flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data> &' for 1st argument
  195. ref_data(Wrapped& o) : inner(o._data().inner) {}
  196. ^
  197. /home/ness/src/flint/flintxx/flint_classes.h:54:5: note: candidate constructor not viable: no known conversion from 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >' to 'long *' for 1st argument
  198. ref_data(Inner* fp) : inner(fp) {}
  199. ^
  200. 1 error generated.
  201. ------END COMPILER ERROR OUTPUT---------
  202.  
  203.  
  204. TEST_FMPZXX_SRCREF_ASSIGN
  205. {
  206. fmpzxx a;
  207. fmpzxx_srcref b(a);
  208. b = a;
  209. }
  210. Compiler error output is 15 line(s), 2234 characters
  211. ------START COMPILER ERROR OUTPUT-------
  212. In file included from t-compiler-errors.cc:31:
  213. In file included from /home/ness/src/flint/fmpzxx.h:32:
  214. /home/ness/src/flint/flintxx/expression.h:253:64: error: no member named 'doit' in 'flint::rules::assignment<flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >, flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, void>'
  215. rules::assignment<derived_t, typename T::evaluated_t>::doit(
  216. ^
  217. /home/ness/src/flint/fmpzxx.h:50:5: note: in instantiation of function template specialization 'flint::expression<flint::derived_wrapper<fmpzxx_expression>, flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >::set<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data> >' requested here
  218. FLINTXX_DEFINE_BASICS(fmpzxx_expression)
  219. ^
  220. /home/ness/src/flint/flintxx/flint_classes.h:232:15: note: expanded from macro 'FLINTXX_DEFINE_BASICS'
  221. this->set(t); \
  222. ^
  223. t-compiler-errors.cc:82:11: note: in instantiation of function template specialization 'flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::srcref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, flint::fmpzxx_expression<flint::operations::immediate, flint::flint_classes::ref_data<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, long> >, long> >::operator=<flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data> >' requested here
  224. b = a;
  225. ^
  226. 1 error generated.
  227. ------END COMPILER ERROR OUTPUT---------
  228.  
  229.  
  230. TEST_FMPZXX_ARITH_WRONG
  231. {
  232. fmpzxx a;
  233. newtype n;
  234. a + n;
  235. }
  236. Compiler error output is 7 line(s), 590 characters
  237. ------START COMPILER ERROR OUTPUT-------
  238. t-compiler-errors.cc:89:11: error: invalid operands to binary expression ('fmpzxx' (aka 'fmpzxx_expression<operations::immediate, detail::fmpz_data>') and 'newtype')
  239. a + n;
  240. ~ ^ ~
  241. /home/ness/src/flint/flintxx/expression.h:461:1: note: candidate template ignored: substitution failure [with Expr1 = flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, Expr2 = newtype]: no type named 'type' in 'flint::mp::enable_if<flint::traits::is_implemented<flint::rules::UNIMPLEMENTED>, int>'
  242. operator+(const Expr1& e1, const Expr2& e2)
  243. ^
  244. 1 error generated.
  245. ------END COMPILER ERROR OUTPUT---------
  246.  
  247.  
  248. TEST_FMPZXX_ARITH_WRONG_DEEP
  249. {
  250. fmpzxx a;
  251. newtype n;
  252. a + (a*a + (a / n) + a)*a;
  253. }
  254. Compiler error output is 7 line(s), 622 characters
  255. ------START COMPILER ERROR OUTPUT-------
  256. t-compiler-errors.cc:96:23: error: invalid operands to binary expression ('fmpzxx' (aka 'fmpzxx_expression<operations::immediate, detail::fmpz_data>') and 'newtype')
  257. a + (a*a + (a / n) + a)*a;
  258. ~ ^ ~
  259. /home/ness/src/flint/flintxx/expression.h:485:1: note: candidate template ignored: substitution failure [with Expr1 = flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>, Expr2 = newtype]: no type named 'type' in 'flint::mp::enable_if<flint::traits::is_implemented<flint::rules::UNIMPLEMENTED>, int>'
  260. operator/(const Expr1& e1, const Expr2& e2)
  261. ^
  262. 1 error generated.
  263. ------END COMPILER ERROR OUTPUT---------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement