You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//MainWindow.xaml.h
#if1inlinevoidforce_instantiation_of_IRefBoolValue()
{
&winrt::Windows::Foundation::IReference<bool>::Value;
}
#else//error C3779 : 'winrt::impl::consume_Windows_Foundation_IReference<winrt::Windows::Foundation::IReference<bool>,T>::Value' : a function that returns 'auto' cannot be used before it is defined
#endif
The text was updated successfully, but these errors were encountered:
Version
2.0.230706.1
Summary
The Xaml compiler generates code that calls
winrt::Windows::Foundation::IReference<bool>::Value
microsoft/microsoft-ui-xaml#9214.If you force the instantiation of
winrt::Windows::Foundation::IReference<bool>::Value
there is no problem.Otherwise, you get the classic
a function that returns 'auto' cannot be used before it is defined
error even though the header is properly included.Feel free to close it seems like a msvc bug since in only happens on
/std:c++20
, I just though you might want to know.Reproducible example
https://github.com/tom-huntington/auto-bool-visibility-conversion-cpp20-regression
The text was updated successfully, but these errors were encountered: