-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As of C++20, it is malformed to have an unnamed class used in typedef with a base class. In the generated reflection code for a service, we were using the following construct to create a reflectable entry for each field in a struct. ``` struct service { typedef struct /* no name */ : ::bond::reflection::MethodTemplate<...> {} method_name; } ``` Now, instead of using an unnamed class, we generate a named class and refer to that: ``` struct service { typedef struct method_name_type : ::bond::reflection::MethodTemplate<...> {} field_name; } ``` This commit is very similar in spirit to f1cb707. See that commit for even more details about what's going on. Also adds a test that compiles a service that has method names that conflict with the names in `MethodTemplate`. The gRPC++ unit test CMake now has a single library with the compiled generated code. Fixes #1027
- Loading branch information
Showing
11 changed files
with
401 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.