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: Handling the `out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]` warning on Xcode 15.

Reviewed By: Daij-Djan

Differential Revision: D46874052

fbshipit-source-id: 6dc7fc08a69c3e7d789a0dc32e2d4d2156d4f6dc
  • Loading branch information
cesar-vargas88 authored and facebook-github-bot committed Jun 27, 2023
1 parent b4fabe8 commit 5095e77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions folly/FixedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ struct FixedStringBase_ {
static constexpr std::size_t npos = static_cast<std::size_t>(-1);
};

#if FOLLY_CPLUSPLUS < 201703L
template <class Void>
constexpr std::size_t FixedStringBase_<Void>::npos;
#endif

using FixedStringBase = FixedStringBase_<>;

Expand Down

0 comments on commit 5095e77

Please sign in to comment.