-
Notifications
You must be signed in to change notification settings - Fork 5
Description
When put the example into a cpp file, then compiles using "clang++ -I.. -Wall -O2 -std=c++11 test1.cpp -o test1 -larmadillo", it gives:
test1.cpp:59:11: error: no matching constructor for initialization of 'cppbugs::MCModel'
MCModel m(model);
^ ~~~~~
../cppbugs/mcmc.model.hpp:38:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
'std::function<void ()>' to 'const cppbugs::MCModel' for 1st argument
class MCModel {
^
../cppbugs/mcmc.model.hpp:55:5: note: candidate constructor not viable: no known conversion from 'std::function<void ()>' to 'cppbugs::RngBase &'
for 1st argument
MCModel(RngBase& rng): rng_(rng), accepted_(0), rejected_(0), logp_value_(-std::numeric_limits::infinity()), old_logp_value_(-s...
^
1 error generated.