placement_new.hpp 813 B

123456789101112131415161718192021222324
  1. #ifndef BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP
  2. #define BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP
  3. ///////////////////////////////////////////////////////////////////////////////
  4. //
  5. // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
  6. // Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/container for documentation.
  10. //
  11. ///////////////////////////////////////////////////////////////////////////////
  12. #include <cstddef>
  13. struct boost_container_new_t{};
  14. //avoid including <new>
  15. inline void *operator new(std::size_t, void *p, boost_container_new_t)
  16. { return p; }
  17. inline void operator delete(void *, void *, boost_container_new_t)
  18. {}
  19. #endif //BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP