placement_new.hpp 872 B

123456789101112131415161718192021222324252627282930
  1. #ifndef BHO_MOVE_DETAIL_PLACEMENT_NEW_HPP
  2. #define BHO_MOVE_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. #ifndef BHO_CONFIG_HPP
  13. # include <asio2/bho/config.hpp>
  14. #endif
  15. #if defined(BHO_HAS_PRAGMA_ONCE)
  16. # pragma once
  17. #endif
  18. struct bho_move_new_t{};
  19. //avoid including <new>
  20. inline void *operator new(std::size_t, void *p, bho_move_new_t)
  21. { return p; }
  22. inline void operator delete(void *, void *, bho_move_new_t)
  23. {}
  24. #endif //BHO_MOVE_DETAIL_PLACEMENT_NEW_HPP