use static_cast_visitor to simplify class implementation, removed custom axis::cast, use standard static_cast instead

This commit is contained in:
Hans Dembinski
2018-07-21 16:19:33 +02:00
parent f7cfd9161e
commit 47d4d85301
5 changed files with 88 additions and 132 deletions

View File

@@ -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);
}