Commit 581791b3 authored by Phil Willoughby's avatar Phil Willoughby Committed by Facebook Github Bot

Namespace rename from UpperCamelCase to snake_case

Summary:
`folly::literals` is to `folly` what `std::literals` is to `std`.

More importantly we should be consitent;  snake_case is how other folly sub-namespaces are named, such as:

`array_detail`
`apply_tuple`
`format_value`
`threadlocal_detail`
`recordio_helpers`
`exception_tracer`

Reviewed By: ericniebler

Differential Revision: D4468281

fbshipit-source-id: de10bec74c9a38f387d62bd55da947291c23970b
parent dd71ee63
......@@ -502,7 +502,7 @@ std::uint32_t hsieh_hash32_buf(const void* buf, std::size_t len);
* of types `FixedString<4>`, `FixedString<8>`, etc. For example:
* \par
* \code
* using namespace folly::StringLiterals;
* using namespace folly::string_literals;
* constexpr auto hello = "hello"_fs8; // A FixedString<8> containing "hello"
* \endcode
* \par
......@@ -514,7 +514,7 @@ std::uint32_t hsieh_hash32_buf(const void* buf, std::size_t len);
* the right size. For example:
* \par
* \code
* using namespace folly::StringLiterals;
* using namespace folly::string_literals;
* // NOTE: Only works on compilers with GNU extensions enabled. Clang and
* // gcc support this (-Wgnu-string-literal-operator-template):
* constexpr auto hello = "hello"_fs; // A FixedString<5> containing "hello"
......@@ -2894,8 +2894,8 @@ FOLLY_CPP14_CONSTEXPR void swap(
a.swap(b);
}
inline namespace Literals {
inline namespace StringLiterals {
inline namespace literals {
inline namespace string_literals {
inline namespace {
// "const std::size_t&" is so that folly::npos has the same address in every
// translation unit. This is to avoid potential violations of the ODR.
......@@ -2914,7 +2914,7 @@ constexpr const std::size_t& npos = detail::fixedstring::FixedStringBase::npos;
* \par Example:
* \par
* \code
* using namespace folly::StringLiterals;
* using namespace folly::string_literals;
* constexpr auto hello = "hello world!"_fs;
* \endcode
*
......
......@@ -21,7 +21,7 @@
#include <folly/portability/GTest.h>
#define FS(x) ::folly::makeFixedString(x)
using namespace folly::StringLiterals;
using namespace folly::string_literals;
TEST(FixedStringExamples, Examples) {
// Example from the docs:
......@@ -117,7 +117,7 @@ TEST(FixedStringCtorTest, FromInitializerList) {
}
TEST(FixedStringCtorTest, FromUDL) {
using namespace folly::Literals;
using namespace folly::literals;
#if defined(__GNUC__)
constexpr auto x = "hello"_fs;
static_assert(
......
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