diff --git a/src/fvm_cell.hpp b/src/fvm_cell.hpp index 5cadd2912d79f793fa01812fc4dcb2a24aefee3d..678ee5e1fec5ad020e9a1d10fd5af0edb00ec887 100644 --- a/src/fvm_cell.hpp +++ b/src/fvm_cell.hpp @@ -138,7 +138,7 @@ public: value_type probe(uint32_t i) const { auto p = probes_[i]; - return (*p.first)[p.second]; + return (this->*p.first)[p.second]; } std::size_t num_probes() const { return probes_.size(); } @@ -187,7 +187,7 @@ private: std::vector<std::pair<uint32_t, i_clamp>> stimulii_; - std::vector<std::pair<const vector_type*, uint32_t>> probes_; + std::vector<std::pair<const vector_type fvm_cell::*, uint32_t>> probes_; /* /// spike event queue @@ -415,10 +415,10 @@ fvm_cell<T, I>::fvm_cell(nest::mc::cell const& cell) uint32_t comp = find_compartment_index(probe.first, graph); switch (probe.second) { case nest::mc::cell::membrane_voltage: - probes_.push_back({&voltage_, comp}); + probes_.push_back({&fvm_cell::voltage_, comp}); break; case nest::mc::cell::membrane_current: - probes_.push_back({¤t_, comp}); + probes_.push_back({&fvm_cell::current_, comp}); break; default: throw std::logic_error("unrecognized probe sort"); diff --git a/tests/test_optional.cpp b/tests/test_optional.cpp index 6755525af3cfb70d610f29dc5fc0c525f68856be..9c6f35cfa658ab1c45cee53250eaa747d89dea25 100644 --- a/tests/test_optional.cpp +++ b/tests/test_optional.cpp @@ -282,7 +282,7 @@ TEST(optionalm,conversion) { TEST(optionalm,or_operator) { optional<const char *> default_msg="default"; - auto x=nullptr | default_msg; + auto x=(char *)0 | default_msg; EXPECT_TRUE((bool)x); EXPECT_STREQ("default",x.get());