RemoveReference.hpp 454 B

1234567891011121314151617181920212223
  1. // Copyright Benoit Blanchon 2014-2016
  2. // MIT License
  3. //
  4. // Arduino JSON library
  5. // https://github.com/bblanchon/ArduinoJson
  6. // If you like this project, please add a star!
  7. #pragma once
  8. namespace ArduinoJson {
  9. namespace TypeTraits {
  10. // A meta-function that return the type T without the reference modifier.
  11. template <typename T>
  12. struct RemoveReference {
  13. typedef T type;
  14. };
  15. template <typename T>
  16. struct RemoveReference<T&> {
  17. typedef T type;
  18. };
  19. }
  20. }