Namespace rename from UpperCamelCase to snake_case
authorPhil Willoughby <philwill@fb.com>
Fri, 27 Jan 2017 14:43:33 +0000 (06:43 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 27 Jan 2017 14:47:53 +0000 (06:47 -0800)
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

folly/FixedString.h
folly/test/FixedStringTest.cpp

index 4f2f10004b08fe7517f10e7758da3dbaa4bfbf20..f30ee507fcc03e7944e2c2976ef740a34470ea7a 100644 (file)
@@ -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
  *
index 3245aaa4aa2dd6d2acb2275b128e4b6824cb5356..c0b019bef6f6dacfd5e3a781dd1de9d8b3478aa4 100644 (file)
@@ -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(