Missing 'typename' error when compiling Fall Creators Update SDK's wrl\event.h with clang-cl |
|||
Issue descriptionWhen testing with the Fall Creators Update SDK and clang-cl I hit the following error: FAILED: obj/media/midi/midi/midi_manager_winrt.obj ../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes @obj/media/midi/midi/midi_manager_winrt.obj.rsp /c ../../media/midi/midi_manager_winrt.cc /Foobj/media/midi/midi/midi_manager_winrt.obj /Fd"obj/media/midi/midi_cc.pdb" In file included from ../../media/midi/midi_manager_winrt.cc:19: c:\src\chromium3\src\third_party\depot_tools\win_toolchain\vs_files\264b4f41744f2e87ca68693d939ee19e681c4fc3\win_sdk\bin\..\..\win_sdk\include\10.0.16299.0\winrt\wrl/event.h(316,65): error: missing 'typename' prior to dependent type name 'DelegateHelper::Interface' return DelegateHelper::Traits::Callback<TDelegateInterface, DelegateHelper::Interface>(Details::Forward<TLambda>(callback)); ^~~~~~~~~~~~~~~~~~~~~~~~~ ../../media/midi/midi_manager_winrt.cc(648,14): note: in instantiation of function template specialization 'Microsoft::WRL::Callback<ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::Devices::Midi::MidiInPort *, ABI::Windows::Devices::Midi::MidiMessageReceivedEventArgs *>, (lambda at ../../media/midi/midi_manager_winrt.cc:650:13)>' requested here WRL::Callback< ^ In file included from ../../media/midi/midi_manager_winrt.cc:19: c:\src\chromium3\src\third_party\depot_tools\win_toolchain\vs_files\264b4f41744f2e87ca68693d939ee19e681c4fc3\win_sdk\bin\..\..\win_sdk\include\10.0.16299.0\winrt\wrl/event.h(316,65): error: missing 'typename' prior to dependent type name 'DelegateHelper::Interface' return DelegateHelper::Traits::Callback<TDelegateInterface, DelegateHelper::Interface>(Details::Forward<TLambda>(callback)); ^~~~~~~~~~~~~~~~~~~~~~~~~ ../../media/midi/midi_manager_winrt.cc(469,14): note: in instantiation of function template specialization 'Microsoft::WRL::Callback<ABI::Windows::Foundation::IAsyncOperationCompletedHandler<ABI::Windows::Devices::Midi::MidiInPort *>, (lambda at ../../media/midi/midi_manager_winrt.cc:470:13)>' requested here WRL::Callback<IAsyncOperationCompletedHandler<RuntimeType*>>( ^ ... The code in question in wrl\event.h is here: // Construct a COM/WinRT delegate (an object with an Invoke() method) from a lambda. // Check the return from this function for null to detect out of memory (E_OUTOFMEMORY) failure case. template<typename TDelegateInterface, typename TLambda> ComPtr<typename Details::DelegateArgTraitsHelper<TDelegateInterface>::Interface> Callback(TLambda&& callback) throw() { using DelegateHelper = Details::DelegateArgTraitsHelper<TDelegateInterface>; return DelegateHelper::Traits::Callback<TDelegateInterface, DelegateHelper::Interface>(Details::Forward<TLambda>(callback)); } I have confirmed that adding 'typename' where request resolves the error and allows this file to compile. I filed a VS/SDK bug here: https://developercommunity.visualstudio.com/content/problem/141824/missing-typename-error-when-compiling-fall-creator.html
,
Nov 1 2017
Update: adding typename in this one place (and fixing other separate SDK issues) allows Chrome to fully build. But, there are probably other places that are missing 'typename' that Chrome just doesn't exercise.
,
Nov 10 2017
,
Feb 21 2018
This has been resolved, through some combination of SDK updates and clang updates. We've given up on the Fall Creators Update SDK for other reasons but the next SDK seems to work fine with clang. |
|||
►
Sign in to add a comment |
|||
Comment 1 by brucedaw...@chromium.org
, Nov 1 2017