]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/spirit/home/classic/core/match.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / spirit / home / classic / core / match.hpp
index 6f1822ece39b42f7752f0100fffa3dfdb163f409..c82baa1489496f16f99099f43729b07efb7fe8fd 100644 (file)
@@ -17,6 +17,8 @@
 #include <boost/spirit/home/classic/core/safe_bool.hpp>
 #include <boost/spirit/home/classic/core/impl/match_attr_traits.ipp>
 #include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/conditional.hpp>
 #include <boost/type_traits/is_reference.hpp>
 
 namespace boost { namespace spirit {
@@ -62,12 +64,20 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
     template <typename T = nil_t>
     class match : public safe_bool<match<T> >
     {
+        typedef typename
+            conditional<
+                is_reference<T>::value
+              , T
+              , typename add_reference<
+                    typename add_const<T>::type
+                >::type
+            >::type attr_ref_t;
 
     public:
 
         typedef typename boost::optional<T> optional_type;
-        typedef typename optional_type::argument_type ctor_param_t;
-        typedef typename optional_type::reference_const_type return_t;
+        typedef attr_ref_t ctor_param_t;
+        typedef attr_ref_t return_t;
         typedef T attr_t;
 
                                 match();