constructibles.nim 611 B

12345678910111213141516171819202122
  1. #
  2. #
  3. # Nim's Runtime Library
  4. # (c) Copyright 2022 Emery Hemingway
  5. #
  6. # See the file "copying.txt", included in this
  7. # distribution, for details about the copyright.
  8. #
  9. type Constructible*[T] {.
  10. importcpp: "Genode::Constructible",
  11. header: "<util/reconstructible.h>", byref, pure.} = object
  12. proc construct*[T](x: Constructible[T]) {.importcpp.}
  13. ## Construct a constructible C++ object.
  14. proc destruct*[T](x: Constructible[T]) {.importcpp.}
  15. ## Destruct a constructible C++ object.
  16. proc constructed*[T](x: Constructible[T]): bool {.importcpp.}
  17. ## Test if an object is constructed.