]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/container/pmr/memory_resource.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / container / pmr / memory_resource.hpp
index 5ca2d7342bf9b8dcfc98c07b72078523004628c0..6f4f24ce069356e5d08e9cb5f29325bb439855a9 100644 (file)
@@ -27,7 +27,7 @@ namespace pmr {
 
 //! The memory_resource class is an abstract interface to an
 //! unbounded set of classes encapsulating memory resources.
-class BOOST_CONTAINER_DECL memory_resource
+class memory_resource
 {
    public:
    // For exposition only
@@ -52,6 +52,8 @@ class BOOST_CONTAINER_DECL memory_resource
    //! `return return do_is_equal(other);`
    bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT
    {  return this->do_is_equal(other);  }
+   
+   #if !defined(BOOST_EMBTC)
 
    //! <b>Returns</b>:
    //!   `&a == &b || a.is_equal(b)`.
@@ -62,6 +64,18 @@ class BOOST_CONTAINER_DECL memory_resource
    //!   !(a == b).
    friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
    {  return !(a == b); }
+   
+   #else
+   
+   //! <b>Returns</b>:
+   //!   `&a == &b || a.is_equal(b)`.
+   friend bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT;
+
+   //! <b>Returns</b>:
+   //!   !(a == b).
+   friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT;
+   
+   #endif
 
    protected:
    //! <b>Requires</b>: Alignment shall be a power of two.
@@ -93,6 +107,20 @@ class BOOST_CONTAINER_DECL memory_resource
    virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT = 0;
 };
 
+#if defined(BOOST_EMBTC)
+
+//! <b>Returns</b>:
+//!   `&a == &b || a.is_equal(b)`.
+inline bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
+{  return &a == &b || a.is_equal(b);   }
+
+//! <b>Returns</b>:
+//!   !(a == b).
+inline bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
+{  return !(a == b); }
+
+#endif
+   
 }  //namespace pmr {
 }  //namespace container {
 }  //namespace boost {