mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
fix: Boolean axes missing options() method (#283)
This commit is contained in:
parent
5e60e86d3c
commit
302c72dc72
@ -9,6 +9,7 @@
|
||||
|
||||
#include <boost/core/nvp.hpp>
|
||||
#include <boost/histogram/axis/iterator.hpp>
|
||||
#include <boost/histogram/axis/option.hpp>
|
||||
#include <boost/histogram/axis/metadata_base.hpp>
|
||||
#include <boost/histogram/detail/relaxed_equal.hpp>
|
||||
#include <boost/histogram/detail/replace_type.hpp>
|
||||
@ -39,6 +40,8 @@ public:
|
||||
|
||||
static constexpr bool inclusive() noexcept { return true; }
|
||||
|
||||
static constexpr unsigned options() noexcept { return option::none_t::value; }
|
||||
|
||||
template <class M>
|
||||
bool operator==(const boolean<M>& o) const noexcept {
|
||||
return detail::relaxed_equal{}(this->metadata(), o.metadata());
|
||||
|
@ -36,6 +36,8 @@ int main() {
|
||||
BOOST_TEST_EQ(a.index(1), 1);
|
||||
BOOST_TEST_EQ(a.index(0), 0);
|
||||
|
||||
BOOST_TEST_EQ(a.options(), axis::option::none_t::value);
|
||||
|
||||
BOOST_TEST_CSTR_EQ(str(a).c_str(), "boolean(metadata=\"foo\")");
|
||||
|
||||
axis::boolean<> b;
|
||||
|
Loading…
x
Reference in New Issue
Block a user