Compiler warning (level 3) C4698

'feature' is for evaluation purposes only and is subject to change or removal in future updates.

Remarks

WinRT APIs that are released for experimentation and feedback are decorated with the Windows.Foundation.Metadata.ExperimentalAttribute attribute. In Visual Studio 2017 version 15.3, the compiler produces warning C4698 for this attribute. A few APIs in previous versions of the Windows SDK have already been decorated with the attribute, and calls to these APIs now trigger this compiler warning. Newer Windows SDKs have the attribute removed from all shipped types. If you're using an older SDK, you'll need to suppress these warnings for all calls to shipped types.

To turn off the warning without code changes

For information on how to disable warnings introduced in a particular compiler version or later, see Compiler warnings by compiler version.

You can turn off the warning for a specific line of code by using the warning pragma, #pragma warning(suppress : 4698). You can also turn off the warning within a file by using the warning pragma, #pragma warning(disable : 4698). You can turn off the warning globally in command-line builds by using the /wd4698 command-line option.

To turn off the warning for an entire project in the Visual Studio IDE:

  1. Open the Property Pages dialog for your project. For information on how to use the Property Pages dialog, see Property Pages.
  2. Select the Configuration Properties > C/C++ > Advanced page.
  3. Edit the Disable Specific Warnings property to add 4698. Choose OK to apply your changes.

Example

This code produces warning C4698 in some versions of the Windows SDK:

Windows::Storage::IApplicationDataStatics2::GetForUserAsync(); // C4698
// 'Windows::Storage::IApplicationDataStatics2::GetForUserAsync' is for
// evaluation purposes only and is subject to change or removal in future updates

To disable the warning, add a #pragma:

#pragma warning(push)
#pragma warning(disable:4698)

Windows::Storage::IApplicationDataStatics2::GetForUserAsync();

#pragma warning(pop)