Skip to content

Commit

Permalink
Delete reflect_enum
Browse files Browse the repository at this point in the history
Summary: All callsites removed

Reviewed By: createdbysk

Differential Revision: D66479596

fbshipit-source-id: fa5176ca314819b1da720f5db669762889bc1e16
  • Loading branch information
iahs authored and facebook-github-bot committed Nov 26, 2024
1 parent b51bd74 commit ba03803
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions thrift/lib/cpp2/reflection/reflection.h
Original file line number Diff line number Diff line change
Expand Up @@ -1299,68 +1299,6 @@ template <typename T>
using is_reflectable_struct = std::
integral_constant<bool, !std::is_same_v<try_reflect_struct<T, void>, void>>;

//////////////////////////////
// SECTION: ENUMERATION API //
//////////////////////////////

/**
* Holds reflection metadata for a given enumeration.
*
* NOTE: this class template is only intended to be instantiated by Thrift.
* Users should ignore the template parameters taken by it and focus simply on
* the members provided.
*
* For the examples below, consider code generated for this Thrift file:
*
* /////////////////////
* // MyModule.thrift //
* /////////////////////
* namespace cpp2 My.Namespace
*
* enum MyEnum {
* a, b, c
* } (
* some.annotation = "some value",
* another.annotation = "another value",
* )
*
* @author: Marcelo Juchem <[email protected]>
*/
template <typename T>
struct reflected_enum {};

/**
* Retrieves reflection metadata (as a `reflected_enum`) associated with the
* given enumeration.
*
* If the given type is not a Thrift enumeration, or if there's no reflection
* metadata available for it, compilation will fail.
*
* See the documentation on `reflected_enum` (above) for more information on
* the returned type.
*
* Example:
*
* /////////////////////
* // MyModule.thrift //
* /////////////////////
* namespace cpp2 My.Namespace
*
* enum MyEnum { a, b, c }
*
* //////////////////
* // whatever.cpp //
* //////////////////
* using info = reflect_enum<My::Namespace::MyEnum>;
*
* // yields `MyEnum`
* auto result = info::type;
*
* @author: Marcelo Juchem <[email protected]>
*/
template <typename T>
using reflect_enum = reflected_enum<T>;

//////////////////////////////////
// SECTION: VARIANT (UNION) API //
//////////////////////////////////
Expand Down

0 comments on commit ba03803

Please sign in to comment.