diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index b9cf883..ca39b21 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -178,14 +178,14 @@
             boost::optional<std::string> module;
             if (ast.m_nodes.back().m_prefix)
                 module = ast.m_nodes.back().m_prefix.value().m_name;
-            container_ cont = boost::get<container_>(ast.m_nodes.back().m_suffix);
+            container_ cont = std::get<container_>(ast.m_nodes.back().m_suffix);
             auto location = pathWithoutLastNode(parserContext.currentSchemaPath());
 
             if (!schema.isPresenceContainer(location, {module, cont.m_name})) {
                 parserContext.m_errorMsg = "This container is not a presence container.";
                 _pass(context) = false;
             }
-        } catch (boost::bad_get&) {
+        } catch (std::bad_variant_access&) {
             parserContext.m_errorMsg = "This is not a container.";
             _pass(context) = false;
         }
@@ -203,7 +203,7 @@
             return;
         }
 
-        if (ast.m_nodes.back().m_suffix.type() != typeid(listElement_)) {
+        if (!std::holds_alternative<listElement_>(ast.m_nodes.back().m_suffix)) {
             parserContext.m_errorMsg = "This is not a list instance.";
             _pass(context) = false;
         }
@@ -215,7 +215,7 @@
     void on_success(Iterator const&, Iterator const&, T& ast, Context const& context)
     {
         auto& parserContext = x3::get<parser_context_tag>(context);
-        if (ast.m_nodes.empty() || ast.m_nodes.back().m_suffix.type() != typeid(leafListElement_)) {
+        if (ast.m_nodes.empty() || !std::holds_alternative<leafListElement_>(ast.m_nodes.back().m_suffix)) {
             parserContext.m_errorMsg = "This is not a leaf list element.";
             _pass(context) = false;
         }
@@ -267,14 +267,14 @@
 
         try {
             auto lastNode = parserContext.currentSchemaPath().m_nodes.back();
-            auto leaf = boost::get<leaf_>(lastNode.m_suffix);
+            auto leaf = std::get<leaf_>(lastNode.m_suffix);
             auto location = pathWithoutLastNode(parserContext.currentSchemaPath());
             ModuleNodePair node{lastNode.m_prefix.flat_map([](const auto& it) { return boost::optional<std::string>{it.m_name}; }), leaf.m_name};
 
             parserContext.m_tmpListKeyLeafPath.m_location = location;
             parserContext.m_tmpListKeyLeafPath.m_node = node;
 
-        } catch (boost::bad_get&) {
+        } catch (std::bad_variant_access&) {
             parserContext.m_errorMsg = "This is not a path to leaf.";
             _pass(context) = false;
         }
