Skip to content

Commit

Permalink
Remove out-of-line constexpr static data member definitions
Browse files Browse the repository at this point in the history
Summary:
```
xplat/folly/crypto/Blake2xb.cpp:26:28: error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
constexpr size_t Blake2xb::kMinOutputLength;
                           ^
xplat/folly/crypto/Blake2xb.cpp:28:28: error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
constexpr size_t Blake2xb::kMaxOutputLength;
                           ^
xplat/folly/crypto/Blake2xb.cpp:30:28: error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
constexpr size_t Blake2xb::kUnknownOutputLength;
```

Reviewed By: Orvid

Differential Revision: D62261373

fbshipit-source-id: e71de0d6ac341b717ae92cd17e2a6984f857730b
  • Loading branch information
praihan authored and facebook-github-bot committed Sep 10, 2024
1 parent 740fc0d commit 110fd8f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions folly/cli/NestedCommandLineApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ ProgramExit::ProgramExit(int status, const std::string& msg)
CHECK(status_ != 0 || msg.empty());
}

constexpr StringPiece const NestedCommandLineApp::kHelpCommand;
constexpr StringPiece const NestedCommandLineApp::kVersionCommand;

NestedCommandLineApp::NestedCommandLineApp(
std::string programName,
std::string version,
Expand Down
7 changes: 0 additions & 7 deletions folly/crypto/Blake2xb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
namespace folly {
namespace crypto {

// static
constexpr size_t Blake2xb::kMinOutputLength;
// static
constexpr size_t Blake2xb::kMaxOutputLength;
// static
constexpr size_t Blake2xb::kUnknownOutputLength;

namespace {

// In libsodium 1.0.17, the crypto_generichash_blake2b_state struct was made
Expand Down
9 changes: 0 additions & 9 deletions folly/test/SocketAddressTestHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@

namespace folly {

constexpr const char* SocketAddressTestHelper::kLoopbackAddrIPv4;
constexpr const char* SocketAddressTestHelper::kLoopbackAddrIPv6;
constexpr const char* SocketAddressTestHelper::kGooglePublicDnsAName;
constexpr const char* SocketAddressTestHelper::kGooglePublicDnsBName;
constexpr const char* SocketAddressTestHelper::kGooglePublicDnsAAddrIPv4;
constexpr const char* SocketAddressTestHelper::kGooglePublicDnsBAddrIPv4;
constexpr const char* SocketAddressTestHelper::kGooglePublicDnsAAddrIPv6;
constexpr const char* SocketAddressTestHelper::kGooglePublicDnsBAddrIPv6;

bool SocketAddressTestHelper::isIPv4Enabled() {
return isFamilyOfAddrEnabled(kLoopbackAddrIPv4);
}
Expand Down

0 comments on commit 110fd8f

Please sign in to comment.