General Purpose library for Freestanding C++ and POSIX systems
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

22 satır
367 B

4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
  1. #pragma once
  2. #include <stddef.h>
  3. #include "gp/allocator/allocator.hpp"
  4. namespace gp {
  5. struct dummy_allocator : public allocator {
  6. virtual void* allocate(size_t)
  7. {
  8. return nullptr;
  9. }
  10. virtual bool deallocate(void*)
  11. {
  12. return false;
  13. }
  14. virtual bool try_reallocate(void*, size_t) {
  15. return false;
  16. }
  17. virtual ~dummy_allocator() = default;
  18. };
  19. }