Commit 8ee373cf authored by Nick Meyer's avatar Nick Meyer Committed by Facebook GitHub Bot

Deprecate folly::svformat

Summary: Deprecate folly::svformat in favor of fmt::format

Reviewed By: vitaut

Differential Revision: D30521196

fbshipit-source-id: 944054191bbfd296d1f666eb6ace6c4308f6d1ea
parent 8ecee58a
...@@ -295,7 +295,11 @@ Formatter<true, Container> vformat(StringPiece fmt, Container&& container) { ...@@ -295,7 +295,11 @@ Formatter<true, Container> vformat(StringPiece fmt, Container&& container) {
* intermediate format object. * intermediate format object.
*/ */
template <class Container> template <class Container>
inline std::string svformat(StringPiece fmt, Container&& container) { [[deprecated(
"Use fmt::format instead of folly::svformat for better performance, build "
"times and compatibility with std::format")]] //
inline std::string
svformat(StringPiece fmt, Container&& container) {
return vformat(fmt, std::forward<Container>(container)).str(); return vformat(fmt, std::forward<Container>(container)).str();
} }
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/portability/Stdlib.h> #include <folly/portability/Stdlib.h>
FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
using namespace folly; using namespace folly;
namespace { namespace {
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/portability/Stdlib.h> #include <folly/portability/Stdlib.h>
FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
using namespace folly; using namespace folly;
namespace { namespace {
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <folly/FBVector.h> #include <folly/FBVector.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
using namespace folly; using namespace folly;
using namespace folly::dynamicconverter_detail; using namespace folly::dynamicconverter_detail;
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/small_vector.h> #include <folly/small_vector.h>
FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
using namespace folly; using namespace folly;
TEST(FormatOther, dynamic) { TEST(FormatOther, dynamic) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment