Guest User

Untitled

a guest
Dec 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.35 KB | None | 0 0
  1. # this command line:
  2. # g++ -std=c++11 -Wc++11-extensions -I /usr/local/include/boost/ big_sieve.cc -o big_sieve
  3.  
  4. big_sieve.cc:15:15: error: cannot convert 'typename enable_if_c<number_category<gmp_int>::value == number_kind_integer, detail::expression<detail::modulus_immediates, number<gmp_int, et_on>, number<gmp_int, et_on> > >::type' (aka 'boost::multiprecision::detail::expression<boost::multiprecision::detail::modulus_immediates, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, void, void>') to 'unsigned long long' without a conversion operator
  5. T c = S(a % T(b));
  6. ^~~~~~~~~~
  7. big_sieve.cc:154:17: note: in instantiation of function template specialization 'modulo<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, unsigned long long>' requested here
  8. const S a_p = modulo(a, p);
  9. ^
  10. big_sieve.cc:193:25: note: in instantiation of function template specialization 'sieve_interval<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, unsigned long long>' requested here
  11. const auto is_prime = sieve_interval(a, L, small_integer(1), B);
  12. ^
  13. In file included from big_sieve.cc:5:
  14. In file included from /usr/local/include/boost/multiprecision/integer.hpp:9:
  15. In file included from /usr/local/include/boost/multiprecision/cpp_int.hpp:12:
  16. In file included from /usr/local/include/boost/multiprecision/number.hpp:20:
  17. /usr/local/include/boost/type_traits/make_unsigned.hpp:38:4: error: static_assert failed "(::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_enum<T>::value>::value)"
  18. BOOST_STATIC_ASSERT(
  19. ^
  20. /usr/local/include/boost/static_assert.hpp:78:41: note: expanded from macro 'BOOST_STATIC_ASSERT'
  21. # define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
  22. ^
  23. /usr/local/include/boost/type_traits/make_unsigned.hpp:144:70: note: in instantiation of template class 'boost::detail::make_unsigned_imp<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  24. BOOST_TT_AUX_TYPE_TRAIT_DEF1(make_unsigned,T,typename boost::detail::make_unsigned_imp<T>::type)
  25. ^
  26. /usr/local/include/boost/type_traits/detail/type_trait_def.hpp:21:13: note: expanded from macro 'BOOST_TT_AUX_TYPE_TRAIT_DEF1'
  27. typedef result type; \
  28. ^
  29. /usr/local/include/boost/random/uniform_int_distribution.hpp:53:22: note: in instantiation of template class 'boost::make_unsigned<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  30. typedef typename make_unsigned<T>::type range_type;
  31. ^
  32. /usr/local/include/boost/random/uniform_int_distribution.hpp:229:12: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  33. return generate_uniform_int(eng, min_value, max_value,
  34. ^
  35. /usr/local/include/boost/random/uniform_int_distribution.hpp:353:22: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  36. { return detail::generate_uniform_int(eng, _min, _max); }
  37. ^
  38. big_sieve.cc:82:15: note: in instantiation of function template specialization 'boost::random::uniform_int_distribution<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >::operator()<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' requested here
  39. const T a = ui(mt);
  40. ^
  41. big_sieve.cc:203:9: note: in instantiation of function template specialization 'miller_rabin<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  42. if(!miller_rabin(p)) {
  43. ^
  44. In file included from big_sieve.cc:7:
  45. In file included from /usr/local/include/boost/random.hpp:36:
  46. In file included from /usr/local/include/boost/random/additive_combine.hpp:27:
  47. In file included from /usr/local/include/boost/random/linear_congruential.hpp:32:
  48. In file included from /usr/local/include/boost/random/detail/seed_impl.hpp:30:
  49. /usr/local/include/boost/random/detail/signed_unsigned_tools.hpp:47:31: error: cannot convert 'detail::expression<detail::negate, detail::expression<add_immediates, number<gmp_int, boost::multiprecision::expression_template_option::et_on>, int, void, void> >' to 'result_type' (aka 'int') without a conversion operator
  50. return result_type(x) + result_type(-(y+1)) + 1;
  51. ^~~~~~~~~~~~~~~~~~
  52. /usr/local/include/boost/random/uniform_int_distribution.hpp:57:30: note: in instantiation of member function 'boost::random::detail::subtract<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, true>::operator()' requested here
  53. const range_type range = random::detail::subtract<result_type>()(max_value, min_value);
  54. ^
  55. /usr/local/include/boost/random/uniform_int_distribution.hpp:229:12: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  56. return generate_uniform_int(eng, min_value, max_value,
  57. ^
  58. /usr/local/include/boost/random/uniform_int_distribution.hpp:353:22: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  59. { return detail::generate_uniform_int(eng, _min, _max); }
  60. ^
  61. big_sieve.cc:82:15: note: in instantiation of function template specialization 'boost::random::uniform_int_distribution<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >::operator()<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' requested here
  62. const T a = ui(mt);
  63. ^
  64. big_sieve.cc:203:9: note: in instantiation of function template specialization 'miller_rabin<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  65. if(!miller_rabin(p)) {
  66. ^
  67. In file included from big_sieve.cc:7:
  68. In file included from /usr/local/include/boost/random.hpp:36:
  69. In file included from /usr/local/include/boost/random/additive_combine.hpp:27:
  70. In file included from /usr/local/include/boost/random/linear_congruential.hpp:32:
  71. In file included from /usr/local/include/boost/random/detail/seed_impl.hpp:30:
  72. /usr/local/include/boost/random/detail/signed_unsigned_tools.hpp:49:12: error: cannot convert 'detail::expression<detail::subtract_immediates, number<gmp_int, et_on>, number<gmp_int, et_on> >' to 'result_type' (aka 'int') without a conversion operator
  73. return result_type(x - y);
  74. ^~~~~~~~~~~~~~~~~
  75. /usr/local/include/boost/random/detail/signed_unsigned_tools.hpp:76:13: error: cannot convert 'detail::expression<detail::negate, detail::expression<add_immediates, number<gmp_int, boost::multiprecision::expression_template_option::et_on>, int, void, void> >' to 'unsigned int' without a conversion operator
  76. if (x > T1(-(y+1))) // result >= 0 after subtraction
  77. ^~~~~~~~~
  78. /usr/local/include/boost/random/uniform_int_distribution.hpp:68:14: note: in instantiation of member function 'boost::random::detail::add<unsigned int, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, true>::operator()' requested here
  79. return random::detail::add<base_unsigned, result_type>()(v, min_value);
  80. ^
  81. /usr/local/include/boost/random/uniform_int_distribution.hpp:229:12: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  82. return generate_uniform_int(eng, min_value, max_value,
  83. ^
  84. /usr/local/include/boost/random/uniform_int_distribution.hpp:353:22: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  85. { return detail::generate_uniform_int(eng, _min, _max); }
  86. ^
  87. big_sieve.cc:82:15: note: in instantiation of function template specialization 'boost::random::uniform_int_distribution<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >::operator()<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' requested here
  88. const T a = ui(mt);
  89. ^
  90. big_sieve.cc:203:9: note: in instantiation of function template specialization 'miller_rabin<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  91. if(!miller_rabin(p)) {
  92. ^
  93. In file included from big_sieve.cc:7:
  94. In file included from /usr/local/include/boost/random.hpp:36:
  95. In file included from /usr/local/include/boost/random/additive_combine.hpp:27:
  96. In file included from /usr/local/include/boost/random/linear_congruential.hpp:32:
  97. In file included from /usr/local/include/boost/random/detail/seed_impl.hpp:30:
  98. /usr/local/include/boost/random/detail/signed_unsigned_tools.hpp:76:13: error: cannot convert 'detail::expression<detail::negate, detail::expression<add_immediates, number<gmp_int, boost::multiprecision::expression_template_option::et_on>, int, void, void> >' to 'int' without a conversion operator
  99. if (x > T1(-(y+1))) // result >= 0 after subtraction
  100. ^~~~~~~~~
  101. /usr/local/include/boost/random/uniform_int_distribution.hpp:184:16: note: in instantiation of member function 'boost::random::detail::add<int, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on>, true>::operator()' requested here
  102. return random::detail::add<range_type, result_type>()(result, min_value);
  103. ^
  104. /usr/local/include/boost/random/uniform_int_distribution.hpp:229:12: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  105. return generate_uniform_int(eng, min_value, max_value,
  106. ^
  107. /usr/local/include/boost/random/uniform_int_distribution.hpp:353:22: note: in instantiation of function template specialization 'boost::random::detail::generate_uniform_int<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>, boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  108. { return detail::generate_uniform_int(eng, _min, _max); }
  109. ^
  110. big_sieve.cc:82:15: note: in instantiation of function template specialization 'boost::random::uniform_int_distribution<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >::operator()<boost::random::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253> >' requested here
  111. const T a = ui(mt);
  112. ^
  113. big_sieve.cc:203:9: note: in instantiation of function template specialization 'miller_rabin<boost::multiprecision::number<boost::multiprecision::backends::gmp_int, boost::multiprecision::expression_template_option::et_on> >' requested here
  114. if(!miller_rabin(p)) {
  115. ^
  116. 6 errors generated.
Add Comment
Please, Sign In to add comment