]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/spirit/home/x3/support/ast/position_tagged.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / spirit / home / x3 / support / ast / position_tagged.hpp
index 22cfd7588b1e49ad36dc065abcb9e70df8c91ff9..3a804840f7b3e62ea68d899f3102f4799213644c 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <boost/range.hpp>
 #include <boost/type_traits/is_base_of.hpp>
+#include <boost/core/enable_if.hpp>
 
 namespace boost { namespace spirit { namespace x3
 {
@@ -46,16 +47,19 @@ namespace boost { namespace spirit { namespace x3
 
         // This will catch all nodes except those inheriting from position_tagged
         template <typename AST>
-        boost::iterator_range<iterator_type>
-        position_of(AST const& ast) const
+        typename boost::enable_if_c<
+            (!is_base_of<position_tagged, AST>::value)
+          , boost::iterator_range<iterator_type>
+        >::type
+        position_of(AST const& /* ast */) const
         {
             // returns an empty position
             return boost::iterator_range<iterator_type>();
         }
-        
+
         // This will catch all nodes except those inheriting from position_tagged
         template <typename AST>
-        void annotate(AST& ast, iterator_type first, iterator_type last, mpl::false_)
+        void annotate(AST& /* ast */, iterator_type /* first */, iterator_type /* last */, mpl::false_)
         {
             // (no-op) no need for tags
         }