Renaming implementation classes in generated WinRT/C++ projection

DavidBlake-7717 0 Reputation points
2023-12-09T16:04:59.1233333+00:00

At the end of this article Raymond Chen suggests renaming the implementation and factory classes.

"We could have avoided this by using different names for our two implementation classes"

https://devblogs.microsoft.com/oldnewthing/20230316-00/?p=107944

Since these names are generated via the projection, how do you rename them as suggested?

If I rename my factory implementation class to have a Fact suffix, then I get an error in generated files that start with the line

// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.220929.3

Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.