Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error with quadmath/black_hole.cpp example #242

Open
solunter opened this issue Jun 2, 2019 · 0 comments
Open

Compiling error with quadmath/black_hole.cpp example #242

solunter opened this issue Jun 2, 2019 · 0 comments

Comments

@solunter
Copy link

solunter commented Jun 2, 2019

I am trying to compile the multiprecision example quadmath/black_hole.cpp. But it failed and gave following errors:

black_hole.cpp:140:94: error: wrong number of template arguments (1, should be 3)
dense_output_dopri5_type dopri5( controlled_dopri5_type( default_error_checker< my_float >( abs_err , rel_err , a_x , a_dxdt ) ) );
^
In file included from
~/boost_1_68_0/include/boost/numeric/odeint.hpp:35:0,
from black_hole.cpp:79:
~/boost_1_68_0/include/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp:56:7: note: provided for ‘template<class Value, class Algebra, class Operations> class boost::numeric::odeint::default_error_checker’
class default_error_checker
^
In file included from /usr/include/c++/5/algorithm:62:0,
from black_hole.cpp:23:
/usr/include/c++/5/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = boost::numeric::odeint::adaptive_time_iterator<boost::numeric::odeint::dense_output_runge_kutta<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_dopri5<std::vector<std::complex<__float128> >, __float128> > >, radMod, std::vector<std::complex<__float128> >, boost::numeric::odeint::dense_output_stepper_tag>; _Funct = main(int, char**)::<lambda(const std::pair<std::vector<std::complex<__float128> >&, __float128>&)>]’:
black_hole.cpp:146:9: required from here
/usr/include/c++/5/bits/stl_algo.h:3767:5: error: no match for call to ‘(main(int, char**)::<lambda(const std::pair<std::vector<std::complex<__float128> >&, __float128>&)>) (boost::iterators::detail::iterator_facade_base<boost::numeric::odeint::adaptive_time_iterator<boost::numeric::odeint::dense_output_runge_kutta<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_dopri5<std::vector<std::complex<__float128> >, __float128> > >, radMod, std::vector<std::complex<__float128> >, boost::numeric::odeint::dense_output_stepper_tag>, std::pair<const std::vector<std::complex<__float128> >, const __float128>, boost::iterators::single_pass_traversal_tag, std::pair<const std::vector<std::complex<__float128> >&, const __float128&>, long int, false, false>::reference)’
__f(__first);
^
/usr/include/c++/5/bits/stl_algo.h:3767:5: note: candidate: void (
)(const std::pair<std::vector<std::complex<__float128> >&, __float128>&)
/usr/include/c++/5/bits/stl_algo.h:3767:5: note: candidate expects 2 arguments, 2 provided
black_hole.cpp:144:68: note: candidate: main(int, char**)::<lambda(const std::pair<std::vector<std::complex<__float128> >&, __float128>&)>
[]( const std::pair< state_type&, my_float > &x ) {
^
black_hole.cpp:144:68: note: no known conversion for argument 1 from ‘boost::iterators::detail::iterator_facade_base<boost::numeric::odeint::adaptive_time_iterator<boost::numeric::odeint::dense_output_runge_kutta<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_dopri5<std::vector<std::complex<__float128> >, __float128> > >, radMod, std::vector<std::complex<__float128> >, boost::numeric::odeint::dense_output_stepper_tag>, std::pair<const std::vector<std::complex<__float128> >, const __float128>, boost::iterators::single_pass_traversal_tag, std::pair<const std::vector<std::complex<__float128> >&, const __float128&>, long int, false, false>::reference {aka std::pair<const std::vector<std::complex<__float128> >&, const __float128&>}’ to ‘const std::pair<std::vector<std::complex<__float128> >&, __float128>&’

I am using gcc-5.4.0 and boost_1_68_0 on Ubuntu 16.04. It is just the original example without any changes. Why doesn't it work?

I would appreciate your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant