identity.h 238 B

12345678910111213141516
  1. //
  2. // identity.h
  3. // stream
  4. //
  5. // Created by Sam Jaffe on 3/29/23.
  6. //
  7. #pragma once
  8. namespace stream::detail {
  9. struct identity {
  10. template <typename T> decltype(auto) operator()(T && t) const {
  11. return std::forward<T>(t);
  12. }
  13. };
  14. }