diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Checks/cm_cxx17_check.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx17_check.cpp b/Source/Checks/cm_cxx17_check.cpp index 4e89184..2de10d6 100644 --- a/Source/Checks/cm_cxx17_check.cpp +++ b/Source/Checks/cm_cxx17_check.cpp @@ -2,8 +2,21 @@ #include <memory> #include <unordered_map> +#ifdef _MSC_VER +# include <comdef.h> +#endif + int main() { std::unique_ptr<int> u(new int(0)); + +#ifdef _MSC_VER + // clang-cl has problems instantiating this constructor in C++17 mode + // error: indirection requires pointer operand ('const _GUID' invalid) + // return *_IID; + IUnknownPtr ptr{}; + IDispatchPtr disp(ptr); +#endif + return *u; } |