Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TEST_FMPZXX_INIT_WRONG
- {
- newtype n;
- fmpzxx a(n);
- }
- Compiler error output is 29 line(s), 2211 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- /home/ness/src/flint/fmpzxx.h:158:9: error: no matching member function for call to 'init'
- init(t);
- ^~~~
- /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
- return data_t(t);
- ^
- /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
- : data(get_data(t)) {}
- ^
- /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
- FLINTXX_DEFINE_CTORS(fmpzxx_expression)
- ^
- /home/ness/src/flint/flintxx/flint_classes.h:252:11: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
- : base_t(t) {} \
- ^
- 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
- fmpzxx a(n);
- ^
- /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
- void init(const fmpzxx_srcref& r)
- ^
- /home/ness/src/flint/fmpzxx.h:162:28: note: candidate template ignored: disabled by 'enable_if' [with T = newtype]
- typename mp::enable_if<traits::is_unsigned_integer<T> >::type init(T t)
- ^
- /home/ness/src/flint/fmpzxx.h:167:28: note: candidate template ignored: disabled by 'enable_if' [with T = newtype]
- typename mp::enable_if<traits::is_signed_integer<T> >::type init(T t)
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_INIT_2
- {
- fmpzxx a(3, 4);
- }
- Compiler error output is 27 line(s), 1767 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- In file included from /home/ness/src/flint/fmpzxx.h:32:
- /home/ness/src/flint/flintxx/expression.h:198:11: error: no matching constructor for initialization of 'flint::detail::fmpz_data'
- : data(t, u) {}
- ^ ~~~~
- /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
- FLINTXX_DEFINE_CTORS(fmpzxx_expression)
- ^
- /home/ness/src/flint/flintxx/flint_classes.h:262:36: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
- name(const T& t, const U& u) : base_t(t, u) {}
- ^
- 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
- fmpzxx a(3, 4);
- ^
- /home/ness/src/flint/fmpzxx.h:156:5: note: candidate constructor template not viable: requires single argument 't', but 2 arguments were provided
- fmpz_data(const T& t)
- ^
- /home/ness/src/flint/fmpzxx.h:145:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
- fmpz_data() {fmpz_init(inner);}
- ^
- /home/ness/src/flint/fmpzxx.h:147:5: note: candidate constructor not viable: requires single argument 'o', but 2 arguments were provided
- fmpz_data(const fmpz_data& o) {fmpz_init_set(inner, o.inner);}
- ^
- /home/ness/src/flint/fmpzxx.h:149:5: note: candidate constructor not viable: requires single argument 'str', but 2 arguments were provided
- fmpz_data(const char* str)
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_ASSIGN_WRONG
- {
- fmpzxx a;
- newtype n;
- a = n;
- }
- Compiler error output is 15 line(s), 1159 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- In file included from /home/ness/src/flint/fmpzxx.h:32:
- /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>'
- rules::assignment<derived_t, T>::doit(downcast(), t);
- ^
- /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
- FLINTXX_DEFINE_BASICS(fmpzxx_expression)
- ^
- /home/ness/src/flint/flintxx/flint_classes.h:232:15: note: expanded from macro 'FLINTXX_DEFINE_BASICS'
- this->set(t); \
- ^
- 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
- a = n;
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_CONVERT_WRONG
- {
- fmpzxx a;
- a.to<newtype>();
- }
- Compiler error output is 17 line(s), 1498 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- In file included from /home/ness/src/flint/fmpzxx.h:31:
- In file included from /home/ness/src/flint/flintxx/evaluation_tools.h:37:
- /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'
- return To(from);
- ^~~~~~~
- /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
- return rules::conversion<T, evaluated_t>::get(evaluate());
- ^
- 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
- a.to<newtype>();
- ^
- 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
- struct newtype { };
- ^
- t-compiler-errors.cc:33:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_REF_INIT_WRONG_1
- {
- const fmpzxx a;
- fmpzxx_ref ar(a);
- }
- Compiler error output is 27 line(s), 3051 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- In file included from /home/ness/src/flint/fmpzxx.h:32:
- /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>')
- return data_t(t);
- ^~~~~~~~
- /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
- : data(get_data(t)) {}
- ^
- /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
- FLINTXX_DEFINE_CTORS(fmpzxx_expression)
- ^
- /home/ness/src/flint/flintxx/flint_classes.h:256:11: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
- : base_t(t) {} \
- ^
- 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
- fmpzxx_ref ar(a);
- ^
- /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
- struct ref_data
- ^
- /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
- ref_data(Wrapped& o) : inner(o._data().inner) {}
- ^
- /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
- ref_data(Inner* fp) : inner(fp) {}
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_REF_INIT_WRONG_2
- {
- const fmpzxx a;
- fmpzxx_srcref asr(a);
- fmpzxx_ref ar(asr);
- }
- Compiler error output is 27 line(s), 5042 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- In file included from /home/ness/src/flint/fmpzxx.h:32:
- /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>')
- return data_t(t);
- ^~~~~~~~
- /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
- : data(get_data(t)) {}
- ^
- /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
- FLINTXX_DEFINE_CTORS(fmpzxx_expression)
- ^
- /home/ness/src/flint/flintxx/flint_classes.h:252:11: note: expanded from macro 'FLINTXX_DEFINE_CTORS'
- : base_t(t) {} \
- ^
- 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
- fmpzxx_ref ar(asr);
- ^
- /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
- struct ref_data
- ^
- /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
- ref_data(Wrapped& o) : inner(o._data().inner) {}
- ^
- /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
- ref_data(Inner* fp) : inner(fp) {}
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_SRCREF_ASSIGN
- {
- fmpzxx a;
- fmpzxx_srcref b(a);
- b = a;
- }
- Compiler error output is 15 line(s), 2234 characters
- ------START COMPILER ERROR OUTPUT-------
- In file included from t-compiler-errors.cc:31:
- In file included from /home/ness/src/flint/fmpzxx.h:32:
- /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>'
- rules::assignment<derived_t, typename T::evaluated_t>::doit(
- ^
- /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
- FLINTXX_DEFINE_BASICS(fmpzxx_expression)
- ^
- /home/ness/src/flint/flintxx/flint_classes.h:232:15: note: expanded from macro 'FLINTXX_DEFINE_BASICS'
- this->set(t); \
- ^
- 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
- b = a;
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_ARITH_WRONG
- {
- fmpzxx a;
- newtype n;
- a + n;
- }
- Compiler error output is 7 line(s), 590 characters
- ------START COMPILER ERROR OUTPUT-------
- t-compiler-errors.cc:89:11: error: invalid operands to binary expression ('fmpzxx' (aka 'fmpzxx_expression<operations::immediate, detail::fmpz_data>') and 'newtype')
- a + n;
- ~ ^ ~
- /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>'
- operator+(const Expr1& e1, const Expr2& e2)
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
- TEST_FMPZXX_ARITH_WRONG_DEEP
- {
- fmpzxx a;
- newtype n;
- a + (a*a + (a / n) + a)*a;
- }
- Compiler error output is 7 line(s), 622 characters
- ------START COMPILER ERROR OUTPUT-------
- t-compiler-errors.cc:96:23: error: invalid operands to binary expression ('fmpzxx' (aka 'fmpzxx_expression<operations::immediate, detail::fmpz_data>') and 'newtype')
- a + (a*a + (a / n) + a)*a;
- ~ ^ ~
- /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>'
- operator/(const Expr1& e1, const Expr2& e2)
- ^
- 1 error generated.
- ------END COMPILER ERROR OUTPUT---------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement