internal.h 921 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _WRL_INTERNAL_H_
  7. #define _WRL_INTERNAL_H_
  8. #include <windows.h>
  9. namespace Microsoft {
  10. namespace WRL {
  11. namespace Details {
  12. struct BoolStruct {
  13. int Member;
  14. };
  15. typedef int BoolStruct::* BoolType;
  16. inline void DECLSPEC_NORETURN RaiseException(HRESULT hr, DWORD flags = EXCEPTION_NONCONTINUABLE) throw() {
  17. ::RaiseException(static_cast<DWORD>(hr), flags, 0, NULL);
  18. }
  19. template <bool b, typename T = void>
  20. struct EnableIf {};
  21. template <typename T>
  22. struct EnableIf<true, T> {
  23. typedef T type;
  24. };
  25. }
  26. }
  27. }
  28. #endif