facebook / fbthrift

Facebook's branch of Apache Thrift, including a new C++ server.
Apache License 2.0
2.55k stars 607 forks source link

Forward declare enums as well in types_fwd.h #558

Closed antonl2 closed 11 months ago

antonl2 commented 12 months ago

Summary: Added new forward_declare_enums.mustache template by copying declare_enums.mustache and turning it into forward declarations only. Had to handle case of cpp_is_unscoped to avoid adding anything for these old fashioned enums. Played a bunch with empty and new lines to make the final generated code look nice.

Finally, had to handle #include <cstdint>. For now made it simple: if enums are there add this light-weight include.

Reviewed By: Jianmin0105

Differential Revision: D47386766

facebook-github-bot commented 12 months ago

This pull request was exported from Phabricator. Differential Revision: D47386766

facebook-github-bot commented 12 months ago

This pull request was exported from Phabricator. Differential Revision: D47386766

facebook-github-bot commented 11 months ago

This pull request was exported from Phabricator. Differential Revision: D47386766

facebook-github-bot commented 11 months ago

This pull request was exported from Phabricator. Differential Revision: D47386766

facebook-github-bot commented 11 months ago

This pull request was exported from Phabricator. Differential Revision: D47386766

facebook-github-bot commented 11 months ago

This pull request has been merged in facebook/fbthrift@5b11bbc8306c0b9e030d77d8f050cc9e6f780ccc.