mirror of
https://github.com/boostorg/histogram.git
synced 2026-01-29 19:42:12 +00:00
use static_cast_visitor to simplify class implementation, removed custom axis::cast, use standard static_cast instead
This commit is contained in:
@@ -331,7 +331,7 @@ int main() {
|
||||
std::string a = "A", b = "B";
|
||||
axis::any_std x = axis::category<std::string>({a, b}, "category");
|
||||
BOOST_TEST_THROWS(x.index(1.5), std::runtime_error);
|
||||
const auto& cx = axis::cast<axis::category<std::string>>(x);
|
||||
auto cx = static_cast<const axis::category<std::string>&>(x);
|
||||
BOOST_TEST_EQ(cx.index(b), 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user