General Purpose library for Freestanding C++ and POSIX systems
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

19 行
254 B

  1. #pragma once
  2. #include <stddef.h>
  3. namespace gp {
  4. struct dummy_allocator{
  5. void* allocate(size_t)
  6. {
  7. return nullptr;
  8. }
  9. bool deallocate(void*)
  10. {
  11. return false;
  12. }
  13. constexpr bool try_reallocate(void*, size_t) {
  14. return false;
  15. }
  16. };
  17. }