Skip to content

Commit

Permalink
Handle integral with cpp.type for populator
Browse files Browse the repository at this point in the history
Summary: currently partial specialization is ambiguous. Explicitly disable generic cpp_type partial specialization for integral.

Reviewed By: iahs

Differential Revision: D68084261

fbshipit-source-id: 0a8c8bea60cc78af8f5683029bb8463a9d057b36
  • Loading branch information
thedavekwon authored and facebook-github-bot committed Jan 14, 2025
1 parent 0fa5fda commit 4ee5023
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions thrift/lib/cpp2/reflection/populator.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,12 @@ struct populator_methods<type::adapted<Adapter, InnerTag>, T> {
}
};

// cpp.type is handled transparently by each implementation
// non-integral cpp.type is handled transparently by each implementation
template <typename T, typename Tag>
struct populator_methods<type::cpp_type<T, Tag>, T>
struct populator_methods<
type::cpp_type<T, Tag>,
T,
std::enable_if_t<!type::is_a_v<Tag, type::integral_c>>>
: populator_methods<Tag, T> {};

/**
Expand Down

0 comments on commit 4ee5023

Please sign in to comment.