declval.h 985 B

12345678910111213141516171819202122232425262728293031323334
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef _LIBCPP___UTILITY_DECLVAL_H
  9. #define _LIBCPP___UTILITY_DECLVAL_H
  10. #include <__config>
  11. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  12. # pragma GCC system_header
  13. #endif
  14. _LIBCPP_BEGIN_NAMESPACE_STD
  15. // Suppress deprecation notice for volatile-qualified return type resulting
  16. // from volatile-qualified types _Tp.
  17. _LIBCPP_SUPPRESS_DEPRECATED_PUSH
  18. template <class _Tp>
  19. _Tp&& __declval(int);
  20. template <class _Tp>
  21. _Tp __declval(long);
  22. _LIBCPP_SUPPRESS_DEPRECATED_POP
  23. template <class _Tp>
  24. decltype(std::__declval<_Tp>(0)) declval() _NOEXCEPT;
  25. _LIBCPP_END_NAMESPACE_STD
  26. #endif // _LIBCPP___UTILITY_DECLVAL_H