Skip to content

Commit

Permalink
Avoid redundant redeclaration of 'constexpr' static data member
Browse files Browse the repository at this point in the history
Summary: Avoid redundant redeclaration of 'constexpr' static data member

Reviewed By: ispeters

Differential Revision: D46622576

fbshipit-source-id: 7e4473d9265d41cddf698d725b78a77f5facf17a
  • Loading branch information
Dan Melnic authored and facebook-github-bot committed Jun 11, 2023
1 parent cb94e9a commit cf09290
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions folly/lang/SafeAssert.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ struct safe_assert_msg_types<safe_assert_msg_type_s<A...>> {
using value_type = c_array<safe_assert_msg_type, sizeof...(A) + 1>;
static constexpr value_type value = {{A..., safe_assert_msg_type::term}};
};

#if FOLLY_CPLUSPLUS < 201703L
template <safe_assert_msg_type... A>
constexpr
typename safe_assert_msg_types<safe_assert_msg_type_s<A...>>::value_type
safe_assert_msg_types<safe_assert_msg_type_s<A...>>::value;
#endif

struct safe_assert_arg {
char const* expr;
Expand Down

0 comments on commit cf09290

Please sign in to comment.