Consistently have the namespace closing comment
authorChristopher Dykes <cdykes@fb.com>
Tue, 24 Oct 2017 00:34:54 +0000 (17:34 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 24 Oct 2017 00:41:00 +0000 (17:41 -0700)
Summary: It's done in a lot of places, but not all. clang-tidy gives us llvm-namespace-comment, which can force this consistently.

Reviewed By: yfeldblum

Differential Revision: D6108129

fbshipit-source-id: 1b44c5a26250364f9edf70f84173e9ba6389f06c

406 files changed:
folly/Array.h
folly/Assume.cpp
folly/Assume.h
folly/AtomicStruct.h
folly/AtomicUnorderedMap.h
folly/CachelinePadded.h
folly/Chrono.h
folly/ClockGettimeWrappers.cpp
folly/ClockGettimeWrappers.h
folly/ConcurrentSkipList-inl.h
folly/ContainerTraits.h
folly/Conv.h
folly/Demangle.h
folly/DynamicConverter.h
folly/ExceptionWrapper-inl.h
folly/ExceptionWrapper.cpp
folly/Executor.cpp
folly/Expected.h
folly/FBVector.h
folly/FixedString.h
folly/Format.h
folly/FormatArg.cpp
folly/FormatTraits.h
folly/Function.h
folly/Functional.h
folly/Indestructible.h
folly/IndexedMemPool.h
folly/Lazy.h
folly/LifoSem.cpp
folly/LockTraitsBoost.h
folly/MapUtil.h
folly/Math.h
folly/Memory.h
folly/MicroLock.cpp
folly/MicroLock.h
folly/MicroSpinLock.h
folly/MoveWrapper.h
folly/Optional.h
folly/PackedSyncPtr.h
folly/PicoSpinLock.h
folly/Portability.h
folly/ProducerConsumerQueue.h
folly/Random.cpp
folly/Random.h
folly/Range.h
folly/SafeAssert.cpp
folly/SafeAssert.h
folly/SharedMutex.cpp
folly/Singleton-inl.h
folly/Singleton.cpp
folly/Singleton.h
folly/SingletonStackTrace.cpp
folly/SingletonThreadLocal.h
folly/SocketAddress.h
folly/SpinLock.h
folly/String-inl.h
folly/ThreadCachedInt.h
folly/TokenBucket.h
folly/Traits.h
folly/UncaughtExceptions.h
folly/Unicode.cpp
folly/Unicode.h
folly/Unit.h
folly/Utility.h
folly/compression/Compression.cpp
folly/compression/test/CompressionTest.cpp
folly/concurrency/ConcurrentHashMap.h
folly/concurrency/CoreCachedSharedPtr.h
folly/container/Foreach.h
folly/container/Iterator.h
folly/container/Merge.h
folly/container/SparseByteSet.h
folly/container/test/IteratorTest.cpp
folly/container/test/SparseByteSetBenchmark.cpp
folly/container/test/SparseByteSetTest.cpp
folly/detail/AtomicHashUtils.h
folly/detail/AtomicUnorderedMapUtils.h
folly/detail/AtomicUtils.h
folly/detail/FileUtilDetail.h
folly/detail/Futex.h
folly/detail/IPAddressSource.h
folly/detail/MPMCPipelineDetail.h
folly/detail/MemoryIdler.cpp
folly/detail/MemoryIdler.h
folly/detail/RangeCommon.cpp
folly/detail/RangeCommon.h
folly/detail/RangeSse42.cpp
folly/detail/RangeSse42.h
folly/detail/Sleeper.h
folly/detail/SocketFastOpen.cpp
folly/detail/SocketFastOpen.h
folly/detail/StaticSingletonManager.cpp
folly/detail/StaticSingletonManager.h
folly/detail/ThreadLocalDetail.cpp
folly/detail/UncaughtExceptionCounter.h
folly/dynamic-inl.h
folly/dynamic.cpp
folly/dynamic.h
folly/executors/GlobalExecutor.cpp
folly/executors/GlobalThreadPoolList.cpp
folly/executors/GlobalThreadPoolList.h
folly/executors/IOExecutor.h
folly/executors/ManualExecutor.h
folly/executors/QueuedImmediateExecutor.cpp
folly/executors/ScheduledExecutor.h
folly/executors/ThreadedExecutor.cpp
folly/executors/ThreadedExecutor.h
folly/executors/test/FiberIOExecutorTest.cpp
folly/executors/test/ThreadedExecutorTest.cpp
folly/executors/thread_factory/PriorityThreadFactory.h
folly/experimental/AsymmetricMemoryBarrier.cpp
folly/experimental/AsymmetricMemoryBarrier.h
folly/experimental/AutoTimer.h
folly/experimental/BitVectorCoding.h
folly/experimental/CodingDetail.h
folly/experimental/EliasFanoCoding.h
folly/experimental/FunctionScheduler.cpp
folly/experimental/FunctionScheduler.h
folly/experimental/JSONSchema.cpp
folly/experimental/JSONSchema.h
folly/experimental/RCURefCount.h
folly/experimental/RCUUtils.cpp
folly/experimental/RCUUtils.h
folly/experimental/ReadMostlySharedPtr.h
folly/experimental/Select64.cpp
folly/experimental/TLRefCount.h
folly/experimental/TestUtil.h
folly/experimental/bser/Bser.h
folly/experimental/bser/Dump.cpp
folly/experimental/bser/Load.cpp
folly/experimental/exception_tracer/ExceptionTracerLib.h
folly/experimental/hazptr/example/LockFreeLIFO.h
folly/experimental/hazptr/example/MWMRSet.h
folly/experimental/hazptr/example/SWMRList.h
folly/experimental/hazptr/example/WideCAS.h
folly/experimental/hazptr/hazptr-impl.h
folly/experimental/hazptr/memory_resource.h
folly/experimental/hazptr/test/HazptrUse1.h
folly/experimental/hazptr/test/HazptrUse2.h
folly/experimental/logging/AsyncFileWriter.cpp
folly/experimental/logging/AsyncFileWriter.h
folly/experimental/logging/GlogStyleFormatter.cpp
folly/experimental/logging/GlogStyleFormatter.h
folly/experimental/logging/ImmediateFileWriter.cpp
folly/experimental/logging/ImmediateFileWriter.h
folly/experimental/logging/Init.cpp
folly/experimental/logging/Init.h
folly/experimental/logging/LogCategory.cpp
folly/experimental/logging/LogCategory.h
folly/experimental/logging/LogFormatter.h
folly/experimental/logging/LogHandler.h
folly/experimental/logging/LogLevel.cpp
folly/experimental/logging/LogLevel.h
folly/experimental/logging/LogMessage.cpp
folly/experimental/logging/LogMessage.h
folly/experimental/logging/LogName.cpp
folly/experimental/logging/LogName.h
folly/experimental/logging/LogStream.cpp
folly/experimental/logging/LogStream.h
folly/experimental/logging/LogStreamProcessor.cpp
folly/experimental/logging/LogStreamProcessor.h
folly/experimental/logging/LogWriter.h
folly/experimental/logging/Logger.cpp
folly/experimental/logging/Logger.h
folly/experimental/logging/LoggerDB.cpp
folly/experimental/logging/LoggerDB.h
folly/experimental/logging/RateLimiter.cpp
folly/experimental/logging/RateLimiter.h
folly/experimental/logging/StandardLogHandler.cpp
folly/experimental/logging/StandardLogHandler.h
folly/experimental/logging/example/lib.cpp
folly/experimental/logging/example/lib.h
folly/experimental/logging/printf.cpp
folly/experimental/logging/printf.h
folly/experimental/logging/test/AsyncFileWriterTest.cpp
folly/experimental/logging/test/FatalHelper.cpp
folly/experimental/logging/test/ImmediateFileWriterTest.cpp
folly/experimental/logging/test/LoggerTest.cpp
folly/experimental/logging/test/StandardLogHandlerTest.cpp
folly/experimental/logging/test/TestLogHandler.h
folly/experimental/logging/test/XlogFile1.cpp
folly/experimental/logging/test/XlogFile2.cpp
folly/experimental/logging/test/XlogHeader1.h
folly/experimental/logging/test/XlogHeader2.h
folly/experimental/logging/xlog.cpp
folly/experimental/logging/xlog.h
folly/experimental/observer/Observable-inl.h
folly/experimental/observer/Observable.h
folly/experimental/observer/Observer-inl.h
folly/experimental/observer/Observer.h
folly/experimental/observer/SimpleObservable-inl.h
folly/experimental/observer/SimpleObservable.h
folly/experimental/observer/detail/Core.cpp
folly/experimental/observer/detail/Core.h
folly/experimental/observer/detail/GraphCycleDetector.h
folly/experimental/observer/detail/Observer-pre.h
folly/experimental/observer/detail/ObserverManager.cpp
folly/experimental/observer/detail/ObserverManager.h
folly/experimental/test/CodingTestUtils.h
folly/experimental/test/NestedCommandLineAppTest.cpp
folly/experimental/test/ProgramOptionsTest.cpp
folly/experimental/test/RefCountBenchmark.cpp
folly/experimental/test/RefCountTest.cpp
folly/experimental/test/TupleOpsTest.cpp
folly/fibers/AddTasks-inl.h
folly/fibers/AddTasks.h
folly/fibers/BatchDispatcher.h
folly/fibers/Baton-inl.h
folly/fibers/Baton.cpp
folly/fibers/Baton.h
folly/fibers/Fiber.cpp
folly/fibers/Fiber.h
folly/fibers/FiberManager-inl.h
folly/fibers/FiberManager.cpp
folly/fibers/FiberManagerInternal-inl.h
folly/fibers/FiberManagerInternal.h
folly/fibers/FiberManagerMap.cpp
folly/fibers/FiberManagerMap.h
folly/fibers/GenericBaton.h
folly/fibers/GuardPageAllocator.cpp
folly/fibers/Promise-inl.h
folly/fibers/Promise.h
folly/fibers/TimedMutex-inl.h
folly/fibers/TimedMutex.h
folly/fibers/TimeoutController.cpp
folly/fibers/TimeoutController.h
folly/fibers/WhenN-inl.h
folly/fibers/WhenN.h
folly/fibers/test/FibersTest.cpp
folly/functional/ApplyTuple.h
folly/functional/test/ApplyTupleTest.cpp
folly/futures/Barrier.cpp
folly/futures/Barrier.h
folly/futures/Future-inl.h
folly/futures/Future-pre.h
folly/futures/Future.cpp
folly/futures/FutureException.cpp
folly/futures/FutureException.h
folly/futures/FutureSplitter.h
folly/futures/Promise-inl.h
folly/futures/Promise.h
folly/futures/SharedPromise-inl.h
folly/futures/SharedPromise.h
folly/futures/detail/Types.h
folly/futures/test/BarrierTest.cpp
folly/futures/test/CallbackLifetimeTest.cpp
folly/futures/test/ConversionOperatorTest.cpp
folly/futures/test/FutureTest.cpp
folly/futures/test/ThenCompileTest.h
folly/futures/test/ThenTest.cpp
folly/gen/Base-inl.h
folly/gen/Base.h
folly/gen/File-inl.h
folly/gen/File.h
folly/gen/Parallel.h
folly/gen/test/BaseTest.cpp
folly/hash/detail/ChecksumDetail.cpp
folly/hash/detail/ChecksumDetail.h
folly/init/Init.cpp
folly/io/async/AsyncSSLSocket.cpp
folly/io/async/AsyncSSLSocket.h
folly/io/async/AsyncSocket.cpp
folly/io/async/AsyncSocketBase.h
folly/io/async/DecoratedAsyncTransportWrapper.h
folly/io/async/DestructorCheck.h
folly/io/async/EventBase.h
folly/io/async/EventBaseLocal.cpp
folly/io/async/EventBaseLocal.h
folly/io/async/EventBaseThread.cpp
folly/io/async/EventBaseThread.h
folly/io/async/Request.cpp
folly/io/async/Request.h
folly/io/async/SSLOptions.cpp
folly/io/async/SSLOptions.h
folly/io/async/ScopedEventBaseThread.cpp
folly/io/async/ScopedEventBaseThread.h
folly/io/async/TimeoutManager.cpp
folly/io/async/VirtualEventBase.cpp
folly/io/async/VirtualEventBase.h
folly/io/async/WriteChainAsyncTransportWrapper.h
folly/io/async/ssl/OpenSSLUtils.cpp
folly/io/async/ssl/SSLErrors.cpp
folly/io/async/ssl/SSLErrors.h
folly/io/async/test/AsyncSSLSocketTest.cpp
folly/io/async/test/AsyncSSLSocketTest.h
folly/io/async/test/AsyncSSLSocketWriteTest.cpp
folly/io/async/test/AsyncSignalHandlerTest.cpp
folly/io/async/test/AsyncSocketTest.cpp
folly/io/async/test/AsyncSocketTest2.h
folly/io/async/test/AsyncTransportTest.cpp
folly/io/async/test/MockAsyncTransport.h
folly/io/async/test/SSLContextTest.cpp
folly/io/async/test/SSLOptionsTest.cpp
folly/io/async/test/SSLSessionTest.cpp
folly/io/async/test/ScopedBoundPort.cpp
folly/io/async/test/ScopedBoundPort.h
folly/io/async/test/SocketPair.cpp
folly/io/async/test/SocketPair.h
folly/io/async/test/TestSSLServer.cpp
folly/io/async/test/TestSSLServer.h
folly/io/async/test/TimeUtil.cpp
folly/io/async/test/TimeUtil.h
folly/io/async/test/TimeUtilTest.cpp
folly/io/async/test/UndelayedDestruction.h
folly/io/async/test/WriteChainAsyncTransportWrapperTest.cpp
folly/io/async/test/WriteFlagsTest.cpp
folly/io/test/IOBufQueueTest.cpp
folly/json.cpp
folly/json.h
folly/portability/Asm.h
folly/portability/Constexpr.h
folly/portability/Event.h
folly/portability/Libgen.cpp
folly/portability/Libgen.h
folly/portability/Math.h
folly/portability/Memory.cpp
folly/portability/Memory.h
folly/portability/OpenSSL.cpp
folly/portability/OpenSSL.h
folly/portability/Sockets.h
folly/portability/SysMembarrier.cpp
folly/portability/SysMembarrier.h
folly/portability/SysUio.h
folly/portability/test/ConstexprTest.cpp
folly/small_vector.h
folly/sorted_vector_types.h
folly/ssl/Init.cpp
folly/ssl/OpenSSLCertUtils.h
folly/ssl/OpenSSLHash.cpp
folly/ssl/OpenSSLHash.h
folly/ssl/OpenSSLPtrTypes.h
folly/ssl/detail/OpenSSLThreading.h
folly/ssl/test/OpenSSLHashTest.cpp
folly/stats/BucketedTimeSeries.cpp
folly/stats/MultiLevelTimeSeries.cpp
folly/stats/TimeseriesHistogram.cpp
folly/stats/test/TimeSeriesTest.cpp
folly/stats/test/TimeseriesHistogramTest.cpp
folly/stop_watch.h
folly/synchronization/CallOnce.h
folly/system/Shell.h
folly/system/ThreadId.h
folly/system/ThreadName.cpp
folly/system/ThreadName.h
folly/system/VersionCheck.cpp
folly/test/AHMIntStressTest.cpp
folly/test/AtomicBitSetTest.cpp
folly/test/AtomicHashMapTest.cpp
folly/test/AtomicUnorderedMapTest.cpp
folly/test/BenchmarkTest.cpp
folly/test/BitIteratorTest.cpp
folly/test/ChronoTest.cpp
folly/test/ConcurrentSkipListBenchmark.cpp
folly/test/ConcurrentSkipListTest.cpp
folly/test/ConstexprMathTest.cpp
folly/test/ConvBenchmark.cpp
folly/test/ConvTest.cpp
folly/test/DeterministicSchedule.cpp
folly/test/DynamicConverterTest.cpp
folly/test/ExceptionTest.cpp
folly/test/ExceptionWrapperTest.cpp
folly/test/ExpectedTest.cpp
folly/test/FBStringTest.cpp
folly/test/FBVectorTest.cpp
folly/test/FileUtilTest.cpp
folly/test/FormatTest.cpp
folly/test/FunctionSchedulerTest.cpp
folly/test/HashBenchmark.cpp
folly/test/HashTest.cpp
folly/test/IndestructibleTest.cpp
folly/test/LazyTest.cpp
folly/test/MPMCPipelineTest.cpp
folly/test/MapUtilTest.cpp
folly/test/MathBenchmark.cpp
folly/test/MathTest.cpp
folly/test/MemcpyTest.cpp
folly/test/MemoryIdlerTest.cpp
folly/test/MoveWrapperTest.cpp
folly/test/OptionalTest.cpp
folly/test/PackedSyncPtrTest.cpp
folly/test/ProducerConsumerQueueBenchmark.cpp
folly/test/ProducerConsumerQueueTest.cpp
folly/test/RWSpinLockTest.cpp
folly/test/RangeTest.cpp
folly/test/SingletonTest.cpp
folly/test/SingletonTestGlobal.cpp
folly/test/SingletonTestStructs.cpp
folly/test/SingletonThreadLocalTest.cpp
folly/test/SmallLocksBenchmark.cpp
folly/test/SmallLocksTest.cpp
folly/test/SocketAddressTestHelper.cpp
folly/test/SocketAddressTestHelper.h
folly/test/StringTest.cpp
folly/test/SubprocessTest.cpp
folly/test/SynchronizedTestLib-inl.h
folly/test/SynchronizedTestLib.h
folly/test/TestUtils.h
folly/test/ThreadCachedIntTest.cpp
folly/test/ThreadLocalTest.cpp
folly/test/TraitsTest.cpp
folly/test/TryTest.cpp
folly/test/UtilityTest.cpp
folly/test/VarintTest.cpp
folly/test/small_vector_test.cpp
folly/test/sorted_vector_test.cpp
folly/test/stl_tests/StlVectorTest.cpp

index 40778564fcf5848959d717725407f8bf8f4fffa6..8b2e7c05b1f630700c5728b6c6526a76acdc886e 100644 (file)
@@ -47,7 +47,7 @@ struct return_type_helper<void, TList...> {
 template <typename D, typename... TList>
 using return_type = std::
     array<typename return_type_helper<D, TList...>::type, sizeof...(TList)>;
-} // !array_detail
+} // namespace array_detail
 
 template <typename D = void, typename... TList>
 constexpr array_detail::return_type<D, TList...> make_array(TList&&... t) {
@@ -56,4 +56,4 @@ constexpr array_detail::return_type<D, TList...> make_array(TList&&... t) {
   return {{static_cast<value_type>(std::forward<TList>(t))...}};
 }
 
-} // !folly
+} // namespace folly
index a986f5c3722d418cec80d5f546a54b9b32507b32..bf148dfd54c1c18d72af8bb10daf483d0fa60b68 100644 (file)
@@ -26,6 +26,6 @@ void assume_check(bool cond) {
   CHECK(cond) << "compiler-hint assumption fails at runtime";
 }
 
-}
+} // namespace detail
 
-}
+} // namespace folly
index 47f4e9ab2b5d4912b4e70455047b1dd494520223..36470fba1574cf05045dc76238d68cd89571e012 100644 (file)
@@ -26,7 +26,7 @@ namespace detail {
 
 extern void assume_check(bool cond);
 
-}
+} // namespace detail
 
 /**
  * Inform the compiler that the argument can be assumed true. It is
index 58345f688602304f70a8f11cb8bb2a0770051445..e32976040793c5b555e4b0786726f7c322889997 100644 (file)
@@ -27,7 +27,7 @@ namespace folly {
 
 namespace detail {
 template <int N> struct AtomicStructIntPick {};
-}
+} // namespace detail
 
 /// AtomicStruct<T> work like C++ atomics, but can be used on any POD
 /// type <= 8 bytes.
index 21cf55e069313bba7fbb38006be9b1f150d836ed..ca867fc1dfa2d0ee71f87418f1e36a655f95ae42 100644 (file)
@@ -519,5 +519,4 @@ struct MutableData {
   explicit MutableData(const T& init) : data(init) {}
 };
 
-
-}
+} // namespace folly
index faaa1eebadc1274f289a165b8bc1ec67418d1731..233d4bd7c53b4dfd34bd4fd8ad03ec42a7b99360 100644 (file)
@@ -74,4 +74,4 @@ class CachelinePadded {
   T inner_;
   char paddingPost_[paddingSize()];
 };
-}
+} // namespace folly
index 852a74b7f6d96ae877446056cdeb44dc79b9f814..53cf480fbd7db906dabee81ae3229a37f5b37fb9 100644 (file)
@@ -74,7 +74,7 @@ template <typename To, typename Duration>
 constexpr To round_impl(Duration const& d, To const& t0) {
   return round_impl(d, t0, t0 + To{1});
 }
-}
+} // namespace detail
 
 //  mimic: std::chrono::ceil, C++17
 //  from: http://en.cppreference.com/w/cpp/chrono/duration/ceil, CC-BY-SA
@@ -148,7 +148,7 @@ constexpr std::chrono::time_point<Clock, To> round(
     std::chrono::time_point<Clock, Duration> const& tp) {
   return std::chrono::time_point<Clock, To>{round<To>(tp.time_since_epoch())};
 }
-}
-}
+} // namespace chrono
+} // namespace folly
 
 #endif
index 96f572ff661c194d151d5688148a6be4ce3fc4f0..9aae08d26d85dc65001cdc3a48f6ad7ca017fdde 100644 (file)
@@ -82,8 +82,8 @@ struct VdsoInitializer {
 };
 
 static const VdsoInitializer vdso_initializer;
-}
+} // namespace
 
 #endif
-}
-}
+} // namespace chrono
+} // namespace folly
index 5786110d0d329ed1e5128c5c1bf1c91bc34e2bb5..f5f1d15f7e2eca8e0459305f2e77d24d24d66bec 100644 (file)
@@ -25,5 +25,5 @@ namespace chrono {
 
 extern int (*clock_gettime)(clockid_t, timespec* ts);
 extern int64_t (*clock_gettime_ns)(clockid_t);
-}
-}
+} // namespace chrono
+} // namespace folly
index 090a732ed82a7a3d30bc4e3d0f99ad1676d68df8..881d05350bb31b77794c5d097a423d20e1687502 100644 (file)
@@ -337,4 +337,5 @@ class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
   NodeAlloc alloc_;
 };
 
-}}  // namespaces
+} // namespace detail
+} // namespace folly
index 1cddf3ba4eb8461a8302293ffd6c6da513ef5042..2d058f4368a5081d7f627cdcb4deac250c495470 100644 (file)
@@ -39,4 +39,4 @@ container_emplace_back_or_push_back(Container& container, Args&&... args) {
   container.push_back(v(std::forward<Args>(args)...));
 }
 
-}
+} // namespace folly
index 351fd4f92d1a431ef3142b519b3ca94d917d94cc..5a9e0069ab25fba620fc9eafb15549f8b58ed319 100644 (file)
@@ -133,7 +133,7 @@ inline void enforceWhitespace(StringPiece sp) {
     throw makeConversionError(err, sp);
   }
 }
-}
+} // namespace detail
 
 /**
  * The identity conversion function.
@@ -283,7 +283,7 @@ unsafeTelescope128(char * buffer, size_t room, unsigned __int128 x) {
   return p;
 }
 
-}
+} // namespace detail
 #endif
 
 /**
index 0a9cf9682484e3c9e99f79d643f541dfde3fd8c0..75061b5c56c87ab9e283e5cfb72a1667964ba0f1 100644 (file)
@@ -62,4 +62,4 @@ inline size_t demangle(const std::type_info& type, char* buf, size_t bufSize) {
 // glibc doesn't have strlcpy
 size_t strlcpy(char* dest, const char* const src, size_t size);
 
-}
+} // namespace folly
index e63bf842666c58ad6d19db25b262cfd736e13a6a..55c9b2e591605e5dea4052a9aeeab29c9d061cb5 100644 (file)
 #include <folly/dynamic.h>
 
 namespace folly {
-  template <typename T> T convertTo(const dynamic&);
-  template <typename T> dynamic toDynamic(const T&);
-}
+template <typename T>
+T convertTo(const dynamic&);
+template <typename T>
+dynamic toDynamic(const T&);
+} // namespace folly
 
 /**
  * convertTo returns a well-typed representation of the input dynamic.
index 7a965525aee302cc0f1f154174bbb41de4a0198a..790b24ca09bd39d95cc916c507b7b4a00c936df0 100644 (file)
@@ -335,7 +335,7 @@ Ex&& dont_slice(Ex&& ex) {
         "be sliced when storing in exception_wrapper.");
   return std::forward<Ex>(ex);
 }
-}
+} // namespace exception_wrapper_detail
 
 template <
     class Ex,
index 7cda0b7645decc3fdd2bff3eaffbc73fa8edf2b3..f2fa016437558dc3be01c13a29e970f272b087af 100644 (file)
@@ -58,7 +58,7 @@ std::exception const* get_std_exception_(std::exception_ptr eptr) noexcept {
     return nullptr;
   }
 }
-}
+} // namespace
 
 exception_wrapper exception_wrapper::from_exception_ptr(
     std::exception_ptr const& ptr) noexcept {
index cae75c965f86c1a1e85ee88a75aa9f7676d64b48..44d1da4a321c1a194252e4488077f7bdf2cd473b 100644 (file)
@@ -36,4 +36,4 @@ void Executor::keepAliveRelease() {
   LOG(FATAL) << __func__ << "() should not be called for folly::Executor types "
              << "which do not override getKeepAliveToken()";
 }
-}
+} // namespace folly
index 57098e28df18f3118816dd874887f0f61acaeb61..c2d4e42d07784fbcd5739198bc843e1a159fa186 100644 (file)
@@ -633,7 +633,7 @@ struct ExpectedHelper {
   }
   FOLLY_POP_WARNING
 };
-}
+} // namespace expected_detail_ExpectedHelper
 /* using override */ using expected_detail_ExpectedHelper::ExpectedHelper;
 
 struct UnexpectedTag {};
index dec58fc09fed781fa1802e45928677ef4cdf2754..428eba628d10b1629887c3fb09b94c181d1c3ff9 100644 (file)
@@ -45,9 +45,9 @@
 // forward declaration
 
 namespace folly {
-  template <class T, class Allocator = std::allocator<T>>
-  class fbvector;
-}
+template <class T, class Allocator = std::allocator<T>>
+class fbvector;
+} // namespace folly
 
 //=============================================================================
 // unrolling
index d91ce1a0dddce8e459ee1e070e70ecf944e9aa1e..cec00226f0b7bf9038b78e8de88f181d6219654e 100644 (file)
@@ -3010,7 +3010,7 @@ 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.
 constexpr const std::size_t& npos = detail::fixedstring::FixedStringBase::npos;
-}
+} // namespace
 
 #if defined(__GNUC__)
 #pragma GCC diagnostic push
@@ -3063,8 +3063,8 @@ FOLLY_DEFINE_FIXED_STRING_UDL(64)
 FOLLY_DEFINE_FIXED_STRING_UDL(128)
 
 #undef FOLLY_DEFINE_FIXED_STRING_UDL
-}
-}
+} // namespace string_literals
+} // namespace literals
 
 // TODO:
 // // numeric conversions:
@@ -3099,4 +3099,4 @@ FOLLY_DEFINE_FIXED_STRING_UDL(128)
 // constexpr FixedString</*...*/> to_fixed_string_ll() noexcept
 // template <unsigned long long val>
 // constexpr FixedString</*...*/> to_fixed_string_ull() noexcept;
-}
+} // namespace folly
index 6ed3c6f1cfba858a65120c353a56764e805c79a1..3837d1079e9636b31d529a32d39f990e0805057d 100644 (file)
@@ -46,7 +46,7 @@ class FormatValue;
 // meta-attribute to identify formatters in this sea of template weirdness
 namespace detail {
 class FormatterTag {};
-};
+} // namespace detail
 
 /**
  * Formatter class.
@@ -322,7 +322,7 @@ struct DefaultValueWrapper {
   const Container& container;
   const Value& defaultValue;
 };
-} // namespace
+} // namespace detail
 
 template <class Container, class Value>
 detail::DefaultValueWrapper<Container, Value> defaulted(
index 1e19aa5f7049eff2c6a243a7a5e83ce7196b5272..fd33a048220ac68fa861004c23f81a3a846c129b 100644 (file)
@@ -24,4 +24,4 @@ namespace folly {
 [[noreturn]] void throwBadFormatArg(std::string const& msg) {
   throw BadFormatArg(msg);
 }
-}
+} // namespace folly
index 145c256da160a84b4239d401e4eeeed872260ccb..4b80112e5dce59e3f3da0dedee11b777e20a45e5 100644 (file)
@@ -60,4 +60,5 @@ struct IndexableTraitsAssoc : public FormatTraitsBase {
   }
 };
 
-}}  // namespaces
+} // namespace detail
+} // namespace folly
index 8cff8d8bb6b519e045c837f67462e10766ba46a6..4bb7e6bea4e1fa90ac08dcd80928ae375b4b3fad 100644 (file)
@@ -753,8 +753,8 @@ struct IsCallableAsImpl<
 
 template <typename Fun, typename FunctionType>
 struct IsCallableAs : IsCallableAsImpl<Fun, FunctionType> {};
-}
-}
+} // namespace function
+} // namespace detail
 
 /**
  * @class FunctionRef
index fa5128961ced0ed43e59760468bbdfd1b3447821..e239e1ac78a7a061056c6dd7cbc7b081056739fc 100644 (file)
@@ -151,4 +151,4 @@ rvalue_reference_wrapper<T> rref(T&& value) noexcept {
 }
 template <typename T>
 rvalue_reference_wrapper<T> rref(T&) noexcept = delete;
-}
+} // namespace folly
index ad1d21cbfeb3fcf06139215d385d69e6930fd64f..56ece8234ac62b470879048fee2a87999ef7df67 100644 (file)
@@ -119,4 +119,4 @@ class Indestructible final {
   Storage storage_{};
   bool erased_{false};
 };
-}
+} // namespace folly
index 899a99e1ac76e99f3f2dc76b104995968aa44638..82ae62954d97f05b3967723c069b604e6a224f2c 100644 (file)
@@ -38,7 +38,7 @@ namespace folly {
 namespace detail {
 template <typename Pool>
 struct IndexedMemPoolRecycler;
-}
+} // namespace detail
 
 template <
     typename T,
@@ -532,7 +532,7 @@ struct IndexedMemPoolRecycler {
   }
 };
 
-}
+} // namespace detail
 
 } // namespace folly
 
index a4fcfd359810be170a731aaa997039845d3b0af0..ff115f3f3d3af233e35bada0678546385e399f87 100644 (file)
@@ -118,7 +118,7 @@ struct Lazy {
   Func func_;
 };
 
-}
+} // namespace detail
 
 //////////////////////////////////////////////////////////////////////
 
@@ -132,4 +132,4 @@ lazy(Func&& fun) {
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index 6a5279fe095a2cf6e2bae9a4563ddf10e5f25102..d3fa50656c8f130c655cb0c68b87710affae36f3 100644 (file)
@@ -37,4 +37,4 @@ ShutdownSemError::ShutdownSemError(const std::string& msg)
 ShutdownSemError::~ShutdownSemError() noexcept {
 }
 
-}
+} // namespace folly
index a488815589d00234e4e934acdde667a215dac9a9..79b8af111225c852838893d70e8eccbd9f32c430 100644 (file)
@@ -37,7 +37,7 @@ boost::chrono::duration<Rep, boost::ratio<Num, Denom>> toBoostDuration(
     const std::chrono::duration<Rep, std::ratio<Num, Denom>>& d) {
   return boost::chrono::duration<Rep, boost::ratio<Num, Denom>>(d.count());
 }
-}
+} // namespace detail
 
 /**
  * LockTraits specialization for boost::shared_mutex
index 15dd4b1846ae5c3b8dc686801bc25119c8302a98..b1fbfadcaf59ecf3db6d14e80f35e472152fa249 100644 (file)
@@ -207,7 +207,7 @@ auto extract_default(const KeysDefault&... keysDefault) ->
     typename DefaultType<KeysDefault...>::type const& {
   return std::get<sizeof...(KeysDefault)-1>(std::tie(keysDefault...));
 }
-}
+} // namespace detail
 
 /**
  * Given a map of maps and a path of keys, return a pointer to the nested value,
index 6d4eee5370ff77fa9f39e4d2badce6dba36a51f8..dc69ee95f20e6275e4dbd33e2e44a44bacf9b0b2 100644 (file)
@@ -104,7 +104,7 @@ using IdivResultType = typename std::enable_if<
         !std::is_same<N, bool>::value &&
         !std::is_same<D, bool>::value,
     decltype(N{1} / D{1})>::type;
-}
+} // namespace detail
 
 #if defined(__arm__) && !FOLLY_AARCH64
 constexpr auto kIntegerDivisionGivesRemainder = false;
index c17662774b1aac670f6c4ece4ae216f6f28e1896..c6c3ea21ddab6037dc034e6bbccbd8180a98be99 100644 (file)
@@ -146,7 +146,7 @@ namespace detail {
 inline void SysFree(void* p) {
   ::free(p);
 }
-}
+} // namespace detail
 
 using SysBufferDeleter = static_function_deleter<void, &detail::SysFree>;
 using SysBufferUniquePtr = std::unique_ptr<void, SysBufferDeleter>;
index ac587ca066429b0a8d488fde1cb8054e97ab79db..e42bd6dd3d3b8d495091152746d7cb8ac3b4a31f 100644 (file)
@@ -65,4 +65,4 @@ retry:
     goto retry;
   }
 }
-}
+} // namespace folly
index c358814da7c008eba708c82c2c32fb82c0bf46f5..eb2795f4c1cf87c2886a4580fc6ba8b9267784d8 100644 (file)
@@ -223,4 +223,4 @@ void MicroLockBase<MaxSpins, MaxYields>::lock(unsigned slot) {
 }
 
 typedef MicroLockBase<> MicroLock;
-}
+} // namespace folly
index d0c9ac23a19562c69aabd54d4757a56a2684549b..b36998a7d4a56bc8210a25e30330be4e2953bbfa 100644 (file)
@@ -155,4 +155,4 @@ typedef std::lock_guard<MicroSpinLock> MSLGuard;
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index 3f8cf0308b377ad97c2944c7b9ab57c26eadebff..7d208e2653d26e9366bccd11a136ccf689c6cb8a 100644 (file)
@@ -74,4 +74,4 @@ MoveWrapper<T0> makeMoveWrapper(T&& t) {
   return MoveWrapper<T0>(std::forward<T0>(t));
 }
 
-} // namespace
+} // namespace folly
index 2bb2d658eb897467cb7786f8343b51f3851196bd..31e1f4fdc8b6a4a84ab7bdd952d63041971e65e2 100644 (file)
@@ -625,6 +625,6 @@ template <typename Value, typename... Args>
 struct coroutine_traits<folly::Optional<Value>, Args...> {
   using promise_type = folly::detail::OptionalPromise<Value>;
 };
-} // experimental
+} // namespace experimental
 FOLLY_NAMESPACE_STD_END
 #endif // FOLLY_HAS_COROUTINES
index 1090240085d965de88a928e85d9ef9b4285a7b3c..a49b0270d0c25a23b699ab9b7701ee3cbfb927a7 100644 (file)
@@ -150,4 +150,4 @@ std::ostream& operator<<(std::ostream& os, const PackedSyncPtr<T>& ptr) {
   os << "PackedSyncPtr(" << ptr.get() << ", " << ptr.extra() << ")";
   return os;
 }
-}
+} // namespace folly
index 070f1fbe97838342aed1dea5db4663ef34802997..5c63583d451ea15a6110308b73900bf2635afe8e 100644 (file)
@@ -284,4 +284,4 @@ struct PicoSpinLock {
   }
 };
 
-}
+} // namespace folly
index 060085c34cd2773e94cf4f3d98bed2c3244ea149..be5960d202b650362a9e631aa37789e881a3210f 100644 (file)
@@ -63,7 +63,7 @@ using max_basic_alignment = max_alignment<
     char32_t,
     wchar_t,
     std::nullptr_t>;
-} // namespace detail
+} // namespace portability_detail
 
 constexpr size_t max_align_v = portability_detail::max_basic_alignment::value;
 
@@ -184,7 +184,7 @@ namespace folly {
 constexpr bool kIsArchAmd64 = FOLLY_X64 == 1;
 constexpr bool kIsArchAArch64 = FOLLY_AARCH64 == 1;
 constexpr bool kIsArchPPC64 = FOLLY_PPC64 == 1;
-}
+} // namespace folly
 
 namespace folly {
 
@@ -199,7 +199,7 @@ constexpr bool kIsSanitizeThread = true;
 #else
 constexpr bool kIsSanitizeThread = false;
 #endif
-}
+} // namespace folly
 
 // packing is very ugly in msvc
 #ifdef _MSC_VER
@@ -313,7 +313,7 @@ constexpr auto kIsDebug = false;
 #else
 constexpr auto kIsDebug = true;
 #endif
-}
+} // namespace folly
 
 // Endianness
 namespace folly {
@@ -328,7 +328,7 @@ constexpr auto kIsLittleEndian = true;
 constexpr auto kIsLittleEndian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__;
 #endif
 constexpr auto kIsBigEndian = !kIsLittleEndian;
-}
+} // namespace folly
 
 #ifndef FOLLY_SSE
 # if defined(__SSE4_2__)
@@ -406,7 +406,7 @@ constexpr auto kMscVer = _MSC_VER;
 constexpr auto kIsWindows = false;
 constexpr auto kMscVer = 0;
 #endif
-}
+} // namespace folly
 
 // Define FOLLY_USE_CPP14_CONSTEXPR to be true if the compiler's C++14
 // constexpr support is "good enough".
index 8d2e47f084fdea9288ece427f9c343f973d80d42..16de57d35486a8207fcb1def59c48d59a1360fd3 100644 (file)
@@ -183,4 +183,4 @@ struct ProducerConsumerQueue {
   char pad1_[CacheLocality::kFalseSharingRange - sizeof(writeIndex_)];
 };
 
-}
+} // namespace folly
index f643fb52e8c34af8d12386caeb8e6e6335f96921..5f94f00cbd7696db7094978c2e908f1ef6b4d864 100644 (file)
@@ -150,4 +150,4 @@ ThreadLocalPRNG::ThreadLocalPRNG() {
 uint32_t ThreadLocalPRNG::getImpl(LocalInstancePRNG* local) {
   return local->rng();
 }
-}
+} // namespace folly
index dbb16bf5676a972eac3df937274620e12d974c82..e74d64b14dcf441c944483092f7a6b8491fb4f2d 100644 (file)
@@ -294,6 +294,6 @@ inline uint32_t randomNumberSeed() {
   return Random::rand32();
 }
 
-}
+} // namespace folly
 
 #include <folly/Random-inl.h>
index 3d91659405e2f9ae566abca6195228845ecbe4e1..6a8161d251fd27eed2f9bb62079428fb920a4588 100644 (file)
@@ -1370,8 +1370,8 @@ constexpr Range<wchar_t const*> operator"" _sp(
     size_t len) noexcept {
   return Range<wchar_t const*>(str, len);
 }
-} // inline namespace string_piece_literals
-} // inline namespace literals
+} // namespace string_piece_literals
+} // namespace literals
 
 } // namespace folly
 
index 37174c793ef10ade25a60efc29ec0607980fd5af..62f3bc447d89724a1975afea30012002a3c583f1 100644 (file)
@@ -49,4 +49,5 @@ void assertionFailure(const char* expr, const char* msg, const char* file,
   abort();
 }
 
-}}  // namespaces
+} // namespace detail
+} // namespace folly
index 27293c9c5dd5287e909cbdfd2255202152f746dc..182b158016caa564c01eee3160e6735f4fd9b79e 100644 (file)
@@ -46,4 +46,5 @@ namespace folly { namespace detail {
     const char* file,
     unsigned int line,
     const char* function);
-}}  // namespace folly
+} // namespace detail
+} // namespace folly
index d8b49887af73f41f2f0f63cac60956a176b910ab..eba2ea43a1062e17da045b48d836aa3168ff66e4 100644 (file)
@@ -20,4 +20,4 @@ namespace folly {
 // Explicitly instantiate SharedMutex here:
 template class SharedMutexImpl<true>;
 template class SharedMutexImpl<false>;
-}
+} // namespace folly
index e5b21dd5318cca600cda5946ecb4fb2bcf6f0e61..745147f0454934097e0d7332d6f6ce76c822500a 100644 (file)
@@ -296,6 +296,6 @@ void SingletonHolder<T>::createInstance() {
   vault_.creationOrder_.wlock()->push_back(type());
 }
 
-}
+} // namespace detail
 
-}
+} // namespace folly
index 7d3eeac61cf377d8cce358251c227c48ddfd2e7d..7114d53de9df1ca16c630913636a4dc6436e1ddf 100644 (file)
@@ -60,7 +60,7 @@ namespace detail {
             << type.name() << ">\n";
   std::abort();
 }
-}
+} // namespace detail
 
 namespace {
 
@@ -88,7 +88,7 @@ FatalHelper fatalHelper;
 FatalHelper __attribute__ ((__init_priority__ (101))) fatalHelper;
 #endif
 
-}
+} // namespace
 
 SingletonVault::~SingletonVault() { destroyInstances(); }
 
@@ -266,4 +266,4 @@ void SingletonVault::scheduleDestroyInstances() {
   static SingletonVaultDestructor singletonVaultDestructor;
 }
 
-}
+} // namespace folly
index 028cf7f1c210d4125b4522a3976b3a04bec26076..40e9dad6b4aa54049577bfb1f3862ce7ee1710c4 100644 (file)
@@ -328,7 +328,7 @@ struct SingletonHolder : public SingletonHolderBase {
   SingletonHolder(SingletonHolder&&) = delete;
 };
 
-}
+} // namespace detail
 
 class SingletonVault {
  public:
@@ -734,6 +734,6 @@ class LeakySingleton {
     entry.state = State::Living;
   }
 };
-}
+} // namespace folly
 
 #include <folly/Singleton-inl.h>
index f5d5f97b6898ba19869e3ea5bbd6ebb0f69c77ba..4f49409b1af4498018a6b665e86c91ad0e18d557 100644 (file)
@@ -56,6 +56,6 @@ SetStackTraceGetter setStackTraceGetter;
 #else
 SetStackTraceGetter __attribute__((__init_priority__(101))) setStackTraceGetter;
 #endif
-}
-}
+} // namespace
+} // namespace folly
 #endif
index d14878bf98759541ff1dc70217be26db0746fe4c..c4d31efd3b251cd720d2ab3e274712d00981ac9c 100644 (file)
@@ -92,4 +92,4 @@ class SingletonThreadLocal {
 
   SingletonT singleton_;
 };
-}
+} // namespace folly
index 929fb6946ac68d9d665a39347ba99c9a535c0f8d..21c35a0546eab2c573ebffba5a509e04dbb19e8c 100644 (file)
@@ -613,7 +613,7 @@ class SocketAddress {
 size_t hash_value(const SocketAddress& address);
 
 std::ostream& operator<<(std::ostream& os, const SocketAddress& addr);
-}
+} // namespace folly
 
 namespace std {
 
@@ -624,4 +624,4 @@ struct hash<folly::SocketAddress> {
     return addr.hash();
   }
 };
-}
+} // namespace std
index b87e58a6ed074415bd230dd21157f06dbb74078e..3df5d4e1c6a10b99f0bb269a937c0bd4fa7cb8af 100644 (file)
@@ -74,4 +74,4 @@ class SpinLockGuardImpl : private boost::noncopyable {
 
 typedef SpinLockGuardImpl<SpinLock> SpinLockGuard;
 
-}
+} // namespace folly
index 2ec534bffc4f36bf8c4a065136d5341296bc4016..f6b5ba993dffbba4d2cc318db4c269f314a0833d 100644 (file)
@@ -355,7 +355,7 @@ bool splitFixed(
   return false;
 }
 
-}
+} // namespace detail
 
 //////////////////////////////////////////////////////////////////////
 
index 58816e37f363e7ef88b3188ff69133d03eec1ff7..9b7c3136f117518e6e71fdfd88249880b9e9192b 100644 (file)
@@ -172,4 +172,4 @@ class ThreadCachedInt : boost::noncopyable {
   };
 };
 
-}
+} // namespace folly
index 905b0f9f31b22b21d17ddc883a7641186202b46d..2abbfe379e71dabd50c7258945fdf82f61fd6ba4 100644 (file)
@@ -385,4 +385,4 @@ class ParameterizedTokenBucket {
 
 using TokenBucket = ParameterizedTokenBucket<>;
 using DynamicTokenBucket = ParameterizedDynamicTokenBucket<>;
-}
+} // namespace folly
index 45781cf5586701260dfa516ab119bf816cd60323..d1ab157a4d4e2494a6eb0349356b86c73a390d8e 100644 (file)
@@ -290,7 +290,7 @@ struct is_trivially_copyable : std::is_trivial<T> {};
 template <class T>
 using is_trivially_copyable = std::is_trivially_copyable<T>;
 #endif
-}
+} // namespace traits_detail
 
 struct Ignore {
   template <class T>
@@ -311,7 +311,7 @@ struct IsEqualityComparable
           decltype(std::declval<T>() == std::declval<U>()),
           bool
       > {};
-}
+} // namespace traits_detail_IsEqualityComparable
 
 /* using override */ using traits_detail_IsEqualityComparable::
     IsEqualityComparable;
@@ -325,7 +325,7 @@ struct IsLessThanComparable
           decltype(std::declval<T>() < std::declval<U>()),
           bool
       > {};
-}
+} // namespace traits_detail_IsLessThanComparable
 
 /* using override */ using traits_detail_IsLessThanComparable::
     IsLessThanComparable;
@@ -353,7 +353,7 @@ struct IsNothrowSwappable
         noexcept(swap(std::declval<T&>(), std::declval<T&>()))
       > {};
 #endif
-}
+} // namespace traits_detail_IsNothrowSwappable
 
 /* using override */ using traits_detail_IsNothrowSwappable::IsNothrowSwappable;
 
index 0c2a63364123a396944fff99df616dbdca0e1f81..0b90f62099b0e0af8e7333b43ade7568e31b0a79 100644 (file)
@@ -26,7 +26,7 @@ namespace __cxxabiv1 {
 struct __cxa_eh_globals;
 // declared in cxxabi.h from libstdc++-v3
 extern "C" __cxa_eh_globals* __cxa_get_globals() noexcept;
-}
+} // namespace __cxxabiv1
 #elif defined(_MSC_VER) && (_MSC_VER >= 1400) && \
     (_MSC_VER < 1900) // MSVC++ 8.0 or greater
 #define FOLLY_EXCEPTION_COUNT_USE_GETPTD
index 811e65c7ac9775bf9e35f3b6615c7c930e1be5a0..b13f4ae93c46dc92698c53be36e4c13ac26818c2 100644 (file)
@@ -148,4 +148,4 @@ char32_t utf8ToCodePoint(
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index c16d87d241d30696484f1e4c4d93538698313bb5..eaeb05f4511253a82a1b49f2c8218381f1b9ea7f 100644 (file)
@@ -41,4 +41,4 @@ char32_t utf8ToCodePoint(
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index dfcce1d3ff37b13ca20d9fff9008f483f3302b08..52f38fcfaf3caaa325bae8810b89b76c21bfd124 100644 (file)
@@ -59,4 +59,4 @@ struct Unit {
 
 constexpr Unit unit {};
 
-}
+} // namespace folly
index 86b338ae128f4f9fd76544c433ebd52e82bfa5e9..bb196080c683ca52a4b86b0ac62bcda89983c765 100644 (file)
@@ -142,7 +142,7 @@ struct make_seq<0> {
   template <typename S0, typename S1>
   using apply = S0;
 };
-}
+} // namespace utility_detail
 
 #if __cpp_lib_integer_sequence || _MSC_VER
 
index 05ea019cca98f31a8217334fbfc973dd1433ffe2..6f288b5ce5ade7bdaae9b8db96f5d2e4c4d39c53 100644 (file)
@@ -1322,7 +1322,7 @@ void zstdFreeCStream(ZSTD_CStream* zcs) {
 void zstdFreeDStream(ZSTD_DStream* zds) {
   ZSTD_freeDStream(zds);
 }
-}
+} // namespace
 
 /**
  * ZSTD compression
index 9c8460482da099d957bce8d3b0d9c2805824e9a6..4bbf50271177b8aec31ec1054e7607c5349d9a08 100644 (file)
@@ -1125,7 +1125,7 @@ class CustomCodec : public Codec {
   std::string prefix_;
   std::unique_ptr<Codec> codec_;
 };
-}
+} // namespace
 
 TEST_P(AutomaticCodecTest, CustomCodec) {
   const uint64_t length = 42;
index 65816b6d3fd6080f5daa96c9856781eb0cbd0bc7..4d8bd6e28ec4e06cac13a9c26e588c03fede759f 100644 (file)
@@ -485,4 +485,4 @@ class ConcurrentHashMap {
   size_t max_size_{0};
 };
 
-} // namespace
+} // namespace folly
index df7e325e65bae40b229ccefdae817d5a36830ff5..21ee292869f9897e25a6fd6e4499cb89faf5a2af 100644 (file)
@@ -146,4 +146,4 @@ class AtomicCoreCachedSharedPtr {
   std::atomic<Slots*> slots_{nullptr};
 };
 
-} // namespace
+} // namespace folly
index f24854dee79c09b23d9cca46f68dba71f7559a0b..ba744e8fffac4a8d3fb5520c8a1017d116389810 100644 (file)
@@ -298,7 +298,8 @@ downTo(T& iter, const U& begin) {
   return true;
 }
 
-} }
+} // namespace detail
+} // namespace folly
 
 /*
  * Look at the Ranges-v3 views and you'll probably find an easier way to build
index c0b7b12e12ee5bed19c7f6459fc64809215bc76c..1c316950de697fa491646dcc0d36687b40b7ee49 100644 (file)
@@ -107,7 +107,7 @@ decltype(auto) unwrap_emplace_arg(
     folly::rvalue_reference_wrapper<Arg> arg) noexcept {
   return std::move(arg).get();
 }
-}
+} // namespace detail
 
 /**
  * Getter function for unpacking a single emplace argument.
@@ -492,4 +492,4 @@ template <bool implicit_unpack = true, typename Container>
 back_emplace_iterator<Container, implicit_unpack> back_emplacer(Container& c) {
   return back_emplace_iterator<Container, implicit_unpack>(c);
 }
-}
+} // namespace folly
index 1979ae716098ef4aa002d748adbc112d667e24d1..2e0a50875136523bc60b959ff1d689bc824a3ffb 100644 (file)
@@ -80,4 +80,4 @@ OutputIt merge(InputIt1 first1, InputIt1 last1,
   return std::copy(first2, last2, d_first);
 }
 
-}
+} // namespace folly
index f6393b0ad9768a2ff8bd6e8a6552c3cfd199e72b..2848f6af15828ac0a9277a08b877a99bc2874b3d 100644 (file)
@@ -85,4 +85,4 @@ class SparseByteSet {
   uint8_t dense_[kCapacity];
 };
 
-}
+} // namespace folly
index 15822e6f1eee2544f43d169718231678e7bb987c..b388fa5dd032b45ddd2ca8c3cbb8bde43cc69d96 100644 (file)
@@ -143,7 +143,7 @@ void emplace_test(Container<Object>& q, Iterator it) {
   EXPECT_EQ(gMoveOpCnt, 0);
   EXPECT_EQ(gConvertOpCnt, 0);
 }
-}
+} // namespace
 
 using namespace folly;
 
index b5e80900257ea3c901ec026732c8f8b0aa49fd4d..a053253e02cc313c1e46d095f452da8cff6f88b4 100644 (file)
@@ -148,7 +148,7 @@ void setup_rand_bench() {
   }
 }
 
-}
+} // namespace
 
 int main(int argc, char** argv) {
   gflags::ParseCommandLineFlags(&argc, &argv, true);
index b0227946c3f7f7451b71c1ab46d6c7e085926756..0e2a36ef3a1b3f0e3ef41f1ec9279755041af045 100644 (file)
@@ -34,7 +34,7 @@ class SparseByteSetTest : public testing::Test {
   SparseByteSet s;
 };
 
-}
+} // namespace
 
 TEST_F(SparseByteSetTest, empty) {
   for (auto c = lims::min(); c < lims::max(); ++c) {
index 49331bf35da83e64accabbfd4f61d1e48bb33f8e..7fb84056bd52d4aae4ced2bb99093018f4a64da9 100644 (file)
@@ -37,4 +37,5 @@ void atomic_hash_spin_wait(Cond condition) {
   }
 }
 
-}} // namespace folly::detail
+} // namespace detail
+} // namespace folly
index 7977a607c18e9d9202b6e0b86563ffc9926112fd..ef467961f367376a6966d5dd19c65f6c68581893 100644 (file)
@@ -74,4 +74,5 @@ struct GivesZeroFilledMemory : public std::false_type {};
 template <>
 struct GivesZeroFilledMemory<MMapAlloc> : public std::true_type{};
 
-}}
+} // namespace detail
+} // namespace folly
index 65d68cf6917994b7f55432b360ca9d278c015617..ff6a85eaf14fc8f40bcc788cb26774be9bc5bcdc 100644 (file)
@@ -32,5 +32,5 @@ inline std::memory_order default_failure_memory_order(
       return successMode;
   }
 }
-}
-} // namespace
+} // namespace detail
+} // namespace folly
index dc0fa2b36669d5442c1d5a1f7736ad83129a6b91..d45cae862d504bc9c69d608bf8d3f588e0ac95d5 100644 (file)
@@ -105,4 +105,5 @@ ssize_t wrapvFull(F f, int fd, iovec* iov, int count, Offset... offset) {
   return totalBytes;
 }
 
-}}  // namespaces
+} // namespace fileutil_detail
+} // namespace folly
index b01d967aef545dd07e5e81e44ca9b1f4e81514fd..a87b8299d93b3b5e0f9bf3be4c17736ce67e1e33 100644 (file)
@@ -164,4 +164,5 @@ FutexResult Futex<EmulatedFutexAtomic>::futexWaitImpl(
       std::chrono::time_point<std::chrono::steady_clock>* absSteadyTime,
       uint32_t waitMask);
 
-}}
+} // namespace detail
+} // namespace folly
index f9e374ee80ace6aaf6bf08188844706044ccf606..4a29d0307ef19e6b22d0f1a5bc46ba56c5e64d1b 100644 (file)
@@ -273,5 +273,5 @@ inline void fastIpv6AppendToString(const in6_addr& in6Addr, std::string& out) {
   char str[sizeof("2001:0db8:0000:0000:0000:ff00:0042:8329")];
   out.append(str, fastIpv6ToBufferUnsafe(in6Addr, str));
 }
-}
-}
+} // namespace detail
+} // namespace folly
index c436c5f6816337abecb6da67888f7eee35ae161c..a96f81bb0356b824235d7a568dbee8020587991e 100644 (file)
@@ -117,4 +117,5 @@ struct AmplificationProduct<std::tuple<T, Ts...>> {
     AmplificationProduct<std::tuple<Ts...>>::value;
 };
 
-}}  // namespaces
+} // namespace detail
+} // namespace folly
index 3eb4bad6df1dca8670070621d39241cf54b5d903..8cf1fb36450a487bacd2eb927f91a58533f4525a 100644 (file)
@@ -167,4 +167,5 @@ void MemoryIdler::unmapUnusedStack(size_t /* retain */) {}
 
 #endif
 
-}}
+} // namespace detail
+} // namespace folly
index 13fe453ef063c07dd47524e82e150f972ae0ed31..1a8fe3ae1355b19c906b1b93470bbf325c5afe85 100644 (file)
@@ -33,7 +33,7 @@ template <>
 struct IsTriviallyCopyable<std::chrono::steady_clock::duration>
   : std::true_type {};
 
-}
+} // namespace folly
 
 namespace folly { namespace detail {
 
@@ -150,4 +150,5 @@ struct MemoryIdler {
   }
 };
 
-}} // namespace folly::detail
+} // namespace detail
+} // namespace folly
index e8949d3fd37a64615f21f70b94edbfb7e759f456..87467b6204d3292a74393ad912a7582e94c306c7 100644 (file)
@@ -53,5 +53,5 @@ size_t qfind_first_byte_of_byteset(
   }
   return std::string::npos;
 }
-}
-}
+} // namespace detail
+} // namespace folly
index ca8cc83324edfab7b26da592abec0d8d36191c10..6a7e8074eb5cf163f3339ba39ac127f5670abd73 100644 (file)
@@ -104,5 +104,5 @@ inline size_t qfind_first_byte_of_nosse(
   }
   return qfind_first_byte_of_std(haystack, needles);
 }
-}
-}
+} // namespace detail
+} // namespace folly
index 651949fb235fd5543b6796c3e9ea2a4edda54dd1..0d82df362190118aee17f4009061cdda9aef6c11 100644 (file)
@@ -33,8 +33,8 @@ size_t qfind_first_byte_of_sse42(
     const StringPieceLite needles) {
   return qfind_first_byte_of_nosse(haystack, needles);
 }
-}
-}
+} // namespace detail
+} // namespace folly
 #else
 #include <cstdint>
 #include <limits>
index 8e89d0f0b2551a27d9389065f04de042462fd8fa..0a5901fc0f3576a22fc8c63e3c54fc47ff32696b 100644 (file)
@@ -27,5 +27,5 @@ namespace detail {
 size_t qfind_first_byte_of_sse42(
     const StringPieceLite haystack,
     const StringPieceLite needles);
-}
-}
+} // namespace detail
+} // namespace folly
index 2d1f24874b27ef33e1fd6171226a48b8e8dfba15..ad8127c2d49b8600d2b8fce24e4defaa5751dab6 100644 (file)
@@ -32,33 +32,33 @@ namespace folly {
 
 namespace detail {
 
-  /*
  * A helper object for the contended case. Starts off with eager
  * spinning, and falls back to sleeping for small quantums.
  */
-  class Sleeper {
-    static const uint32_t kMaxActiveSpin = 4000;
+/*
+ * A helper object for the contended case. Starts off with eager
+ * spinning, and falls back to sleeping for small quantums.
+ */
+class Sleeper {
+  static const uint32_t kMaxActiveSpin = 4000;
 
-    uint32_t spinCount;
+  uint32_t spinCount;
 
  public:
-    Sleeper() : spinCount(0) {}
+ public:
+  Sleeper() : spinCount(0) {}
 
-    void wait() {
-      if (spinCount < kMaxActiveSpin) {
-        ++spinCount;
-        asm_volatile_pause();
-      } else {
-        /*
-         * Always sleep 0.5ms, assuming this will make the kernel put
-         * us down for whatever its minimum timer resolution is (in
-         * linux this varies by kernel version from 1ms to 10ms).
-         */
-        struct timespec ts = { 0, 500000 };
-        nanosleep(&ts, nullptr);
-      }
+  void wait() {
+    if (spinCount < kMaxActiveSpin) {
+      ++spinCount;
+      asm_volatile_pause();
+    } else {
+      /*
+       * Always sleep 0.5ms, assuming this will make the kernel put
+       * us down for whatever its minimum timer resolution is (in
+       * linux this varies by kernel version from 1ms to 10ms).
+       */
+      struct timespec ts = {0, 500000};
+      nanosleep(&ts, nullptr);
     }
-  };
+  }
+};
 
-}
-}
+} // namespace detail
+} // namespace folly
index a6385496d01d78bae1524ece12c085329f35cc3f..3f83344700b2bde1008c81d9cc773c646e94ea88 100644 (file)
@@ -121,5 +121,5 @@ bool tfo_succeeded(int /* sockfd */) {
 }
 
 #endif
-}
-}
+} // namespace detail
+} // namespace folly
index 732dc4bd9fa28579679c2d2c1076f4154783bbee..ed6289f41f80a2276eae176aa68f6a3c83a280db 100644 (file)
@@ -44,5 +44,5 @@ int tfo_enable(int sockfd, size_t max_queue_size);
  * Check if TFO succeeded in being used.
  */
 bool tfo_succeeded(int sockfd);
-}
-}
+} // namespace detail
+} // namespace folly
index a75734babe2ca2a3d5c5fc21a340310f7e86b412..3d7ab93ca24758366623cb7cbb5773246eacde1f 100644 (file)
@@ -23,5 +23,5 @@ StaticSingletonManager& StaticSingletonManager::instance() {
   static StaticSingletonManager* instance = new StaticSingletonManager();
   return *instance;
 }
-}
-}
+} // namespace detail
+} // namespace folly
index a6088c12b7a7bc495ce1e08aed5645b0fe92735f..f5c540b1bbb3b1bad7de1cc09326acdc09f8dec6 100644 (file)
@@ -84,5 +84,5 @@ template <typename T, typename Tag>
 inline T* createGlobal() {
   return createGlobal<T, Tag>([]() { return new T(); });
 }
-}
-}
+} // namespace detail
+} // namespace folly
index 4c0364618cb7c39be7da73e1b80ece6af63579dd..4d652451debc616e049f04a360e8a291a2b70d53 100644 (file)
@@ -305,7 +305,7 @@ class AtForkList {
 #endif
   }
 };
-}
+} // namespace
 
 void StaticMetaBase::initAtFork() {
   AtForkList::instance();
@@ -322,4 +322,5 @@ void StaticMetaBase::registerAtFork(
 
 FOLLY_STATIC_CTOR_PRIORITY_MAX
 PthreadKeyUnregister PthreadKeyUnregister::instance_;
-}}
+} // namespace threadlocal_detail
+} // namespace folly
index 2e8a7ed6de25258513e9538ddc60f42a41cffb7a..4170c215ee1c9e30fd0941590ea5557280c2f055 100644 (file)
@@ -47,4 +47,5 @@ class UncaughtExceptionCounter {
   int exceptionCount_;
 };
 
-}} // namespaces
+} // namespace detail
+} // namespace folly
index 325060f046f400e9b0ce491136b44a1939d014a9..7b187d7c88509df00f6fafc1bcc459c58fa982fd 100644 (file)
@@ -36,7 +36,7 @@ struct hash<::folly::dynamic> {
   }
 };
 
-}
+} // namespace std
 
 //////////////////////////////////////////////////////////////////////
 
@@ -97,35 +97,38 @@ struct TypeError : std::runtime_error {
 
 namespace detail {
 
-  // This helper is used in destroy() to be able to run destructors on
-  // types like "int64_t" without a compiler error.
-  struct Destroy {
-    template <class T> static void destroy(T* t) { t->~T(); }
-  };
-
-  /*
-   * Helper for implementing numeric conversions in operators on
-   * numbers.  Just promotes to double when one of the arguments is
-   * double, or throws if either is not a numeric type.
-   */
-  template <template <class> class Op>
-  dynamic numericOp(dynamic const& a, dynamic const& b) {
-    if (!a.isNumber() || !b.isNumber()) {
-      throwTypeError_("numeric", a.type(), b.type());
-    }
-    if (a.type() != b.type()) {
-      auto& integ  = a.isInt() ? a : b;
-      auto& nonint = a.isInt() ? b : a;
-      return Op<double>()(to<double>(integ.asInt()), nonint.asDouble());
-    }
-    if (a.isDouble()) {
-      return Op<double>()(a.asDouble(), b.asDouble());
-    }
-    return Op<int64_t>()(a.asInt(), b.asInt());
+// This helper is used in destroy() to be able to run destructors on
+// types like "int64_t" without a compiler error.
+struct Destroy {
+  template <class T>
+  static void destroy(T* t) {
+    t->~T();
   }
+};
 
+/*
+ * Helper for implementing numeric conversions in operators on
+ * numbers.  Just promotes to double when one of the arguments is
+ * double, or throws if either is not a numeric type.
+ */
+template <template <class> class Op>
+dynamic numericOp(dynamic const& a, dynamic const& b) {
+  if (!a.isNumber() || !b.isNumber()) {
+    throwTypeError_("numeric", a.type(), b.type());
+  }
+  if (a.type() != b.type()) {
+    auto& integ = a.isInt() ? a : b;
+    auto& nonint = a.isInt() ? b : a;
+    return Op<double>()(to<double>(integ.asInt()), nonint.asDouble());
+  }
+  if (a.isDouble()) {
+    return Op<double>()(a.asDouble(), b.asDouble());
+  }
+  return Op<int64_t>()(a.asInt(), b.asInt());
 }
 
+} // namespace detail
+
 //////////////////////////////////////////////////////////////////////
 
 /*
index 842b7fb68a606a196f173cba5a71f793337a40b5..aee3e87dd02d1d4c15672b99395bc9af965d1de4 100644 (file)
@@ -323,4 +323,4 @@ void dynamic::destroy() noexcept {
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index bab21a59f742fa3bc9f3c74f21967ff8e79f79a4..ad88edc525ff324d8322c5f67154e1fa3f661641 100644 (file)
@@ -576,6 +576,6 @@ struct dynamic : private boost::operators<dynamic> {
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
 
 #include <folly/dynamic-inl.h>
index ef85375171ff5f4f65be06b3192ae835f7a809b4..0341e7123c3389cf3e4dcf17f32802d51fc5508c 100644 (file)
@@ -46,7 +46,7 @@ Singleton<std::shared_ptr<IOThreadPoolExecutor>> globalIOThreadPool([] {
           sysconf(_SC_NPROCESSORS_ONLN),
           std::make_shared<NamedThreadFactory>("GlobalIOThreadPool")));
 });
-}
+} // namespace
 
 namespace folly {
 
index a9e5e5329ef5bc3f03dccd732fe08cde0f39c7d4..2c9a71f7ca86d3abe73c67864e413ce818a73898 100644 (file)
@@ -215,4 +215,4 @@ void ThreadPoolListHook::registerThread() {
       this, std::this_thread::get_id());
 }
 
-} // folly
+} // namespace folly
index 8e13df0853123e51cdf4e3037a9d9043ba4e56ec..a48b526a7af56c761cfdafebcdb9513b1bcf3083 100644 (file)
@@ -58,4 +58,4 @@ class ThreadPoolListHook {
   ThreadPoolListHook();
 };
 
-} // folly
+} // namespace folly
index 223c0496629de37caa01a9e1d6d5892cba2600a9..18209e2a0d823bf0440d9d0dfaee56c4a234ae2e 100644 (file)
@@ -20,7 +20,7 @@
 
 namespace folly {
 class EventBase;
-}
+} // namespace folly
 
 namespace folly {
 
index bfaaf259472349b58b43641a00d7211f961bad0d..9f060164cb158524c8163fc30494c7010a4b592c 100644 (file)
@@ -154,4 +154,4 @@ namespace folly {
     TimePoint now_ = TimePoint::min();
   };
 
-}
+  } // namespace folly
index 1dbdb5c1379746c68600bb0982a56fbce72b2750..a8a9d0a8407f29f3f6c23a4ee6a9f27ce09fc16e 100644 (file)
@@ -34,4 +34,4 @@ void QueuedImmediateExecutor::addStatic(Func callback) {
   }
 }
 
-} // namespace
+} // namespace folly
index ac77de9d3c6a9015913b03854803bdda5edf05a2..b61331bc4e1d8b62bf0e95fc720dda35903c1172 100644 (file)
@@ -56,4 +56,4 @@ namespace folly {
        return std::chrono::steady_clock::now();
      }
   };
-}
+  } // namespace folly
index badfc5497e9d20919adbef57a10dbde53811827e..7578f546d628683afb94b2a41163c444cb6f8132 100644 (file)
@@ -108,4 +108,4 @@ bool ThreadedExecutor::controlPerformAll() {
   controlLaunchEnqueuedTasks();
   return !stopping || !running_.empty();
 }
-}
+} // namespace folly
index 9417898778287f17049f83273ff53178a3661beb..9ea42e1d397ae044c2e6f0b780abaab8699581d7 100644 (file)
@@ -96,4 +96,4 @@ class ThreadedExecutor : public virtual folly::Executor {
   std::mutex finishedm_;
   std::deque<std::thread::id> finished_;
 };
-}
+} // namespace folly
index 87d60c7e17f888294130ebcb1efcc0556c5039dc..2d46f8b2c99ab36619601ca116eeac64d17d1964 100644 (file)
@@ -24,7 +24,7 @@
 namespace {
 
 class FiberIOExecutorTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(FiberIOExecutorTest, event_base) {
   auto tpe = std::make_shared<folly::IOThreadPoolExecutor>(1);
index 591be5743cee90c454b2cc76d5dd716afb661ba7..ecb8d2dc850ebeb1009b3bca34311a30f4f7cc3a 100644 (file)
@@ -24,7 +24,7 @@
 namespace {
 
 class ThreadedExecutorTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(ThreadedExecutorTest, example) {
   folly::ThreadedExecutor x;
index 0c75fefe399429e4c5e68fe29b2643dd1a829c35..a7762d89a35c72736878a4f7327193624380af3b 100644 (file)
@@ -57,4 +57,4 @@ class PriorityThreadFactory : public ThreadFactory {
   int priority_;
 };
 
-} // folly
+} // namespace folly
index fc5b660141c3ebaa9b8bbd2b5a425ef98db8e343..c8ae0178b69bc3f9a4b51c8a8d0746bff4fa0c44 100644 (file)
@@ -78,7 +78,7 @@ void mprotectMembarrier() {
   r = mprotect(dummyPage, 1, PROT_READ);
   checkUnixError(r, "mprotect");
 }
-}
+} // namespace
 
 void asymmetricHeavyBarrier(AMBFlags flags) {
   if (kIsLinux) {
@@ -94,4 +94,4 @@ void asymmetricHeavyBarrier(AMBFlags flags) {
     std::atomic_thread_fence(std::memory_order_seq_cst);
   }
 }
-}
+} // namespace folly
index faffa0b3712fc89d18b94cf2ef6ffb85bc346fea..c20157db4bc043d7199e12e040b9ac3604e9ffae 100644 (file)
@@ -36,4 +36,4 @@ FOLLY_ALWAYS_INLINE void asymmetricLightBarrier() {
 }
 
 void asymmetricHeavyBarrier(AMBFlags flags = AMBFlags::NORMAL);
-}
+} // namespace folly
index 49df7b952fc8d3644bdb561528f3348d7da6fae7..545c3be7649319e4dfc14da3f7c5df21dc9c8aa7 100644 (file)
@@ -146,4 +146,4 @@ struct GoogleLogger final {
     }
   }
 };
-}
+} // namespace folly
index 38dde11ae2969595a2e84829541f0ce9c4322ee9..99c9c576265dd7112d14742eab4122d757e93d27 100644 (file)
@@ -444,4 +444,5 @@ class BitVectorReader : detail::ForwardPointers<Encoder::forwardQuantum>,
   ValueType upperBound_;
 };
 
-}}  // namespaces
+} // namespace compression
+} // namespace folly
index 10de64c88e4bf3c1183a065617e65e440259f1a6..6e84ea73d733ab5ae0e486e2ad045d9a5800efa2 100644 (file)
@@ -58,6 +58,6 @@ class SkipPointers<0> {
   explicit SkipPointers(const unsigned char*) {}
   constexpr static const unsigned char* const skipPointers_{};
 };
-}
-}
-}
+} // namespace detail
+} // namespace compression
+} // namespace folly
index edfed0968858d0364f52af5a953dcde5c5862db2..628b813da46fbebca605cb2338b5f6b486f12a92 100644 (file)
@@ -753,4 +753,5 @@ class EliasFanoReader {
   uint8_t numLowerBits_;
 };
 
-}}  // namespaces
+} // namespace compression
+} // namespace folly
index 61538106ea623adc6d9bc7e3be84d52d5c9dae0f..ce58c43c69648ecbaea4bdda8247df87681b3fb5 100644 (file)
@@ -493,4 +493,4 @@ void FunctionScheduler::setThreadName(StringPiece threadName) {
   threadName_ = threadName.str();
 }
 
-}
+} // namespace folly
index fbc739936550ce9eb1ef6731e31b8a8d8954edc6..59dc4bce1e7ec34b9af6f7924781f9f4455350f1 100644 (file)
@@ -298,4 +298,4 @@ class FunctionScheduler {
   bool cancellingCurrentFunction_{false};
 };
 
-}
+} // namespace folly
index 570e2c76bab577e106401eda6a2a62bf27715a6d..d739fd108a90a52f3570a56c0727ccd762d20d63 100644 (file)
@@ -1010,7 +1010,7 @@ const char* metaschemaJson =
 folly::Singleton<Validator> schemaValidator([]() {
   return makeValidator(parseJson(metaschemaJson)).release();
 });
-}
+} // namespace
 
 Validator::~Validator() = default;
 
@@ -1025,5 +1025,5 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema) {
 std::shared_ptr<Validator> makeSchemaValidator() {
   return schemaValidator.try_get();
 }
-}
-}
+} // namespace jsonschema
+} // namespace folly
index e11a5a8c2f4aff99bdabc37a88f31736d43baa9f..7e17b0dc25db60cf22420be5aca58562cea62fc1 100644 (file)
@@ -69,5 +69,5 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema);
  * this before you use makeValidator().
  */
 std::shared_ptr<Validator> makeSchemaValidator();
-}
-}
+} // namespace jsonschema
+} // namespace folly
index 19c87593e5460cd7ce7be219af42b4b75970a832..9d86aa8d5003f1d95700f77daf68d20f5b26ee64 100644 (file)
@@ -167,4 +167,4 @@ class RCURefCount {
   std::atomic<int64_t> globalCount_{1};
 };
 
-}
+} // namespace folly
index c49638f6d3f8340945e0baff14928f8aae62d4b0..f36da98832fb5ef40966422422c0c8297e268aab 100644 (file)
@@ -33,7 +33,7 @@ struct RCURegisterThreadHelper {
   bool alive{false};
 };
 
-}
+} // namespace
 
 bool RCURegisterThread() {
   static folly::ThreadLocal<RCURegisterThreadHelper>* rcuRegisterThreadHelper =
@@ -53,4 +53,4 @@ RCUReadLock& RCUReadLock::instance() {
   static RCUReadLock instance;
   return instance;
 }
-}
+} // namespace folly
index e0af4d70f769592b341e4955f1cb8fa318acb318..545a25f816c5795ac5083fcc7799c2c33b62b6ae 100644 (file)
@@ -45,4 +45,4 @@ class RCUReadLock {
   RCUReadLock() {}
 };
 
-}
+} // namespace folly
index 580152ac49af62f9d5acab1d232420ba8ce84566..f80fdde1e1aec9e47c25626e5d986ec1cfc71c33 100644 (file)
@@ -94,7 +94,7 @@ class ReadMostlySharedPtrCore {
   std::shared_ptr<T> ptr_;
 };
 
-}
+} // namespace detail
 
 template <typename T, typename RefCount = DefaultRefCount>
 class ReadMostlyMainPtr {
@@ -451,4 +451,4 @@ inline bool operator!=(
     const ReadMostlySharedPtr<T, RefCount>& ptr) {
   return !(ptr == nullptr);
 }
-}
+} // namespace folly
index 0c000853897368426e89e202287c6fb52851b7ca..a3937b56dc24eba0d6b5593ae291ce414e950b0f 100644 (file)
@@ -102,4 +102,5 @@ const uint8_t kSelectInByte[2048] = {
   8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7
 };
 
-}}
+} // namespace detail
+} // namespace folly
index 9e2a1da5213b330aab1505056c218723ce70e8a7..3e099ea8bbf4ff9344ed3074de34aff1ff65aec6 100644 (file)
@@ -210,4 +210,4 @@ class TLRefCount {
   std::shared_ptr<void> collectGuard_;
 };
 
-}
+} // namespace folly
index b6d2ad745947eb666dee12fa3ad00ff52f4fae1f..b9481490df843c8d73bd3493693bce17b8deabcb 100644 (file)
@@ -128,7 +128,7 @@ struct SavedState {
 };
 SavedState disableInvalidParameters();
 void enableInvalidParameters(SavedState state);
-}
+} // namespace detail
 
 // Ok, so fun fact: The CRT on windows will actually abort
 // on certain failed parameter validation checks in debug
index be06e9ffb6a9a052c23a3d6d27b31e3a6cba06f4..571a7fdef6102ad18aa3d213770036ecac2b1312 100644 (file)
@@ -97,8 +97,8 @@ folly::fbstring toBser(folly::dynamic const&, const serialization_opts&);
 std::unique_ptr<folly::IOBuf> toBserIOBuf(
     folly::dynamic const&,
     const serialization_opts&);
-}
-}
+} // namespace bser
+} // namespace folly
 
 /* vim:ts=2:sw=2:et:
  */
index 58a2da1dc0d8caaafeef71eca4ec89d86aae131e..26133cdee1f33c6356af4f79b7bcc854afb14194 100644 (file)
@@ -247,8 +247,8 @@ fbstring toBser(dynamic const& dyn, const serialization_opts& opts) {
   auto buf = toBserIOBuf(dyn, opts);
   return buf->moveToFbString();
 }
-}
-}
+} // namespace bser
+} // namespace folly
 
 /* vim:ts=2:sw=2:et:
  */
index d1b8185b57db36d9949b1275e69534506dfe1c0b..2894e901c1d9cd811c6d5c2db4c684b797a533e3 100644 (file)
@@ -221,8 +221,8 @@ folly::dynamic parseBser(ByteRange str) {
 folly::dynamic parseBser(StringPiece str) {
   return parseBser(ByteRange((uint8_t*)str.data(), str.size()));
 }
-}
-}
+} // namespace bser
+} // namespace folly
 
 /* vim:ts=2:sw=2:et:
  */
index ce5ea80c7e7f353a44b584e2a485fd146b965464..45393bf3a6c9407545c9da6f9f76d1d017b6ac14 100644 (file)
@@ -34,7 +34,7 @@ void dummyCxaBeginCatch(void*) noexcept;
 void dummyCxaRethrow() noexcept;
 void dummyCxaEndCatch() noexcept;
 void dummyRethrowException(std::exception_ptr) noexcept;
-}
+} // namespace detail
 
 using CxaThrowType = decltype(&detail::dummyCxaThrow);
 using CxaBeginCatchType = decltype(&detail::dummyCxaBeginCatch);
@@ -47,5 +47,5 @@ void registerCxaBeginCatchCallback(CxaBeginCatchType callback);
 void registerCxaRethrowCallback(CxaRethrowType callback);
 void registerCxaEndCatchCallback(CxaEndCatchType callback);
 void registerRethrowExceptionCallback(RethrowExceptionType callback);
-}
-}
+} // namespace exception_tracer
+} // namespace folly
index 22a00de8ef66cf6da155bce670d0ea90c81e182d..6ad1211849833175c9ebcaace2d1448b58c126f9 100644 (file)
@@ -80,5 +80,5 @@ class LockFreeLIFO {
   std::atomic<Node*> head_ = {nullptr};
 };
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 81b79ca84ed9bec24d5ba5639d8d37ba3e3e0a3f..eccca4fe01bd78e35c52ddfd23e88d9f46f1ab4d 100644 (file)
@@ -247,5 +247,5 @@ class MWMRListSet {
   }
 };
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 17ed7ce94f8c080ddb8fdfdf7583d2b547c47f15..2e909e553752ca2777b33b70a8d4926b7fc59fdf 100644 (file)
@@ -134,5 +134,5 @@ class SWMRListSet {
   }
 };
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 8b4ce81a370e38f8ff2ef0caa7028b9096bacd58..90a6341cb94bc3023b6918dd9964ecb54698b0a9 100644 (file)
@@ -64,5 +64,5 @@ class WideCAS {
   }
 };
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 178bd9dbec59ba3388b1909e0d01da03514843f0..82734d6f21c6092dc80a0db960a1a225ad40d567 100644 (file)
@@ -993,5 +993,5 @@ inline hazptr_tls_life::~hazptr_tls_life() {
   tls_state_ = TLS_DESTROYED;
 }
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 9123b8cef79809382e9d1055951323435ae4e986..c9759ae84fc307b76450d7934530b5b2d996db8f 100644 (file)
@@ -45,5 +45,5 @@ memory_resource* get_default_resource();
 void set_default_resource(memory_resource*);
 memory_resource* new_delete_resource();
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 29294dedbea5fa05fdc422768c8488eb05c90662..9bc0848a58937ac77375d10cfdb719a3a10d11f1 100644 (file)
@@ -47,5 +47,5 @@ class Node1 : public hazptr_obj_base<Node1, MyReclaimerFree<Node1>> {
   char a[100];
 };
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 9d1b1008788b87272caa044f740530313d411c8b..8917897d781654e5c2052473d14c23a2522e55bb 100644 (file)
@@ -49,5 +49,5 @@ inline void mineReclaimFnDelete(Node2* p) {
   delete p;
 }
 
-} // namespace folly
 } // namespace hazptr
+} // namespace folly
index 61c379fe8cf08369a2ac9efb61e15602c0329a1b..e76c73a691eb6f2425ea69fbfa0b95db343149b4 100644 (file)
@@ -170,4 +170,4 @@ std::string AsyncFileWriter::getNumDiscardedMsg(size_t numDiscarded) {
       numDiscarded,
       " log messages discarded: logging faster than we can write\n");
 }
-}
+} // namespace folly
index 2fb2e454c77265f84aebb7bd99720661ae709f1b..4fdd24ebe34fd159c214071a0e9b50057d914169 100644 (file)
@@ -115,4 +115,4 @@ class AsyncFileWriter : public LogWriter {
    */
   std::thread ioThread_;
 };
-}
+} // namespace folly
index 2307fb68aab120447b118eb2ba41d9bf59e694da..60c4656e22b99a946318357f33be4f6877a57714 100644 (file)
@@ -36,7 +36,7 @@ StringPiece getGlogLevelName(LogLevel level) {
   }
   return "CRITICAL";
 }
-}
+} // namespace
 
 namespace folly {
 
@@ -126,4 +126,4 @@ std::string GlogStyleFormatter::formatMessage(
 
   return buffer;
 }
-}
+} // namespace folly
index d732f0062df5f67f3af557ba319e72e6606cf293..68ec6c6f1ecb974fb786f827e72017b2446df8f2 100644 (file)
@@ -56,4 +56,4 @@ class GlogStyleFormatter : public LogFormatter {
       const LogMessage& message,
       const LogCategory* handlerCategory) override;
 };
-}
+} // namespace folly
index 2035efd9c8ecb14acc2d5a8d2138e207eb938b3e..02e8f99136352c89c0a4a0bb9a1c17b9b33be7b9 100644 (file)
@@ -49,4 +49,4 @@ void ImmediateFileWriter::writeMessage(
 }
 
 void ImmediateFileWriter::flush() {}
-}
+} // namespace folly
index d21c25e81d98e17c299e572cfddd3b1058e09ae4..42c341b36e0d4d6fc1bc0c1eab97fcef14da3a8d 100644 (file)
@@ -56,4 +56,4 @@ class ImmediateFileWriter : public LogWriter {
 
   folly::File file_;
 };
-}
+} // namespace folly
index d1e6a6a98ac2fa855be55e5f633a0984b2c7b7a7..3c6c3957ab30e3541be37e3b0f2b16aa321f7e96 100644 (file)
@@ -73,4 +73,4 @@ std::string LoggingConfigError::computeMessage(const vector<string>& errors) {
   }
   return msg;
 }
-}
+} // namespace folly
index 5491974aa5cff833598aac18872dbc09d79a0e0a..2b924abe7cb3ebcf509a8c3cc6c6cee472c9afbf 100644 (file)
@@ -62,4 +62,4 @@ class LoggingConfigError : public std::invalid_argument {
  private:
   std::string computeMessage(const std::vector<std::string>& errors);
 };
-}
+} // namespace folly
index eceea8717f0ec79aebeb00c905099c702b9c5f64..66640df37a4645dc2472b31203fedb72afae4828 100644 (file)
@@ -229,4 +229,4 @@ void LogCategory::parentLevelUpdated(LogLevel parentEffectiveLevel) {
 void LogCategory::registerXlogLevel(std::atomic<LogLevel>* levelPtr) {
   xlogLevels_.push_back(levelPtr);
 }
-}
+} // namespace folly
index ce97c918bbe75660098ddfb970efcc6e9aeeea1d..91e72c91c69b164a0073b1b4254d90cba6f06b23 100644 (file)
@@ -256,4 +256,4 @@ class LogCategory {
    */
   std::vector<std::atomic<LogLevel>*> xlogLevels_;
 };
-}
+} // namespace folly
index ad3c085ec4883614221ca7f1f4c538f937d95fb5..b97191b166e7dadf2c7a7627f2eb96b6d4ab0232 100644 (file)
@@ -43,4 +43,4 @@ class LogFormatter {
       const LogMessage& message,
       const LogCategory* handlerCategory) = 0;
 };
-}
+} // namespace folly
index 60d1db65232adace34713ded847692948240a4ad..525eea4dff3006888b277b4cc42e57c78e67807b 100644 (file)
@@ -80,4 +80,4 @@ class LogHandler {
    */
   virtual void flush() = 0;
 };
-}
+} // namespace folly
index 1a4d15e1eaca4805c08919f19fa6bb4885f1ebde..808446085ad8cf9527d1436f209682f79b83b19e 100644 (file)
@@ -119,4 +119,4 @@ std::ostream& operator<<(std::ostream& os, LogLevel level) {
   os << logLevelToString(level);
   return os;
 }
-}
+} // namespace folly
index a3e0e34abf71c6cd8dbba0da8af076e9b916576d..c0dc40d0547b55a074da72fe93d311830cbfa09a 100644 (file)
@@ -124,4 +124,4 @@ inline constexpr bool isLogLevelFatal(LogLevel level) {
   return folly::kIsDebug ? (level >= LogLevel::DFATAL)
                          : (level >= LogLevel::FATAL);
 }
-}
+} // namespace folly
index 7b4bd253ad9c8e930549f6460eab0f4fb0f44f2d..d98803d077497fa92b19f94d106c2160d9f26c30 100644 (file)
@@ -131,4 +131,4 @@ void LogMessage::sanitizeMessage() {
     }
   }
 }
-}
+} // namespace folly
index ab859433aa67dc7cf2054ea7c70220cff0e4391c..250fba77430533e3eded9223e05043a248dd5ac3 100644 (file)
@@ -149,4 +149,4 @@ class LogMessage {
    */
   std::string message_;
 };
-}
+} // namespace folly
index 8bf8398fea339266342417ed63990e27c29dd435..a0927593951d6c52193554a7482b94bc1f69f975 100644 (file)
@@ -124,4 +124,4 @@ StringPiece LogName::getParent(StringPiece name) {
 
   return StringPiece(name.begin(), idx);
 }
-}
+} // namespace folly
index dfe055fd5c8a0c95fa32b82f862c53e25c37f255..4c8fe8600dccffd76e5b21dcc42311ea67159a87 100644 (file)
@@ -84,4 +84,4 @@ class LogName {
     }
   };
 };
-}
+} // namespace folly
index 6b851099f99f0a1240655011cd9e4cdcad495c19..cd81fb7113072c657bebc6624b48771d95a75249 100644 (file)
@@ -52,4 +52,4 @@ LogStream::LogStream(LogStreamProcessor* processor)
 }
 
 LogStream::~LogStream() {}
-}
+} // namespace folly
index 9906ae61b58be1f11f2a38137caa7212224acdbb..7d00d3dcc9bb584b253c9d91ca9784d05d72d52c 100644 (file)
@@ -83,4 +83,4 @@ class LogStream : public std::ostream {
   LogStreamBuffer buffer_;
   LogStreamProcessor* const processor_;
 };
-}
+} // namespace folly
index 6fe0888170a9b50163291ec6e29ad46dc8301035..f1ae33e8f13fe77dc10a9021188c81dc3f88d2b7 100644 (file)
@@ -76,7 +76,7 @@ LogCategory* getXlogCategory(
   }
   return categoryInfo->getCategory(&xlog_detail::xlogFileScopeInfo);
 }
-}
+} // namespace
 
 /**
  * Construct a LogStreamProcessor from an XlogCategoryInfo.
@@ -112,7 +112,7 @@ LogCategory* getXlogCategory(XlogFileScopeInfo* fileScopeInfo) {
   // Therefore we never need to check if it is initialized here.
   return fileScopeInfo->category;
 }
-}
+} // namespace
 
 /**
  * Construct a LogStreamProcessor from an XlogFileScopeInfo.
@@ -219,4 +219,4 @@ void logDisabledHelper(std::integral_constant<bool, true>) noexcept {
   // builds) or DFATAL (in debug builds).
   abort();
 }
-}
+} // namespace folly
index 66db917c641be826ddbfe691227ade7fe93925e9..96db4a6b7ee236c758783c4e9986e3491d402dc6 100644 (file)
@@ -68,7 +68,7 @@ inline void fallbackFormatOneArg(std::string* str, const Arg* arg, long) {
 #endif
   str->append("<no_string_conversion>)");
 }
-}
+} // namespace detail
 
 template <bool IsInHeaderFile>
 class XlogCategoryInfo;
@@ -496,4 +496,4 @@ inline void logDisabledHelper(std::integral_constant<bool, false>) noexcept {}
 [[noreturn]] void logDisabledHelper(
         std::integral_constant<bool, true>) noexcept;
 // clang-format on
-}
+} // namespace folly
index eba37714b7c461f53684e93846baf1cec3e20868..3d99f2252707f7854ee30b576047fcb50db19552 100644 (file)
@@ -73,4 +73,4 @@ class LogWriter {
    */
   virtual void flush() = 0;
 };
-}
+} // namespace folly
index eb8a96168ccbde1d66accf471c789f4a69cc0995..b3f268c43d684320ac385efa4895fca26a6286c3 100644 (file)
@@ -31,4 +31,4 @@ Logger::Logger(LogCategory* cat) : category_(cat) {}
 
 Logger::Logger(LoggerDB* db, StringPiece name)
     : Logger{db->getCategory(name)} {}
-}
+} // namespace folly
index 5525c4ea1e87eb24dbe7c9e22065fd0172315d4e..2701d467e432f8fd138c558b8593ea13e3fa3443 100644 (file)
@@ -125,4 +125,4 @@ class Logger {
  private:
   LogCategory* const category_{nullptr};
 };
-}
+} // namespace folly
index 516485aa8bc01822c23668556e1dbcac3a47bb49..ee09681a981ac344ef3b1e70d7f3a20fa11e5032 100644 (file)
@@ -55,7 +55,7 @@ class LoggerDBSingleton {
  private:
   LoggerDB* db_;
 };
-}
+} // namespace
 
 LoggerDB* LoggerDB::get() {
   // Intentionally leaky singleton
@@ -316,4 +316,4 @@ void LoggerDB::defaultInternalWarningImpl(
     folly::writeFull(STDERR_FILENO, fullMsg.data(), fullMsg.size());
   }
 }
-}
+} // namespace folly
index 0f7fed2d21e898748e64f572c7beecf3ae307342..1c80cd965bf2ae171d1017fe9579ac309ee07add 100644 (file)
@@ -203,4 +203,4 @@ class LoggerDB {
 
   static std::atomic<InternalWarningHandler> warningHandler_;
 };
-}
+} // namespace folly
index c163c80f4e07783b1ea48b75971734f29ce0e7d9..9ac40f325c739ecd13d6575dada52af6e58afa38 100644 (file)
@@ -43,5 +43,5 @@ bool IntervalRateLimiter::checkSlow() {
   count_.store(1, std::memory_order_release);
   return true;
 }
-}
-}
+} // namespace logging
+} // namespace folly
index acd04a8636ccd40047d560aac38167fa74478c56..2627f0274058ce227233ef9987a40cfaa949fc66 100644 (file)
@@ -64,5 +64,5 @@ class IntervalRateLimiter : public RateLimiter {
   // since time_point's constructor is not noexcept
   std::atomic<std::chrono::steady_clock::rep> timestamp_;
 };
-}
-}
+} // namespace logging
+} // namespace folly
index 51debdac0d028d39460fc534950b2859073b4859..9e43cd6da84806d7f78fb9df71217792fe1cbb17 100644 (file)
@@ -40,4 +40,4 @@ void StandardLogHandler::handleMessage(
 void StandardLogHandler::flush() {
   writer_->flush();
 }
-}
+} // namespace folly
index 7fd082022c320b49342931af1ba3f2617bb00e8c..94b2699a388f26a08d32508a04890ec53adad993 100644 (file)
@@ -74,4 +74,4 @@ class StandardLogHandler : public LogHandler {
   std::shared_ptr<LogFormatter> formatter_;
   std::shared_ptr<LogWriter> writer_;
 };
-}
+} // namespace folly
index 7190c707b63a316cabb270555e15a8f231d77f50..416801cf30df55bdc0090deead1c1b19b8822d75 100644 (file)
@@ -21,4 +21,4 @@ ExampleObject::~ExampleObject() {
   // folly.experimental.logging.example.lib
   XLOGF(DBG1, "ExampleObject({}) at {} destroyed", value_, this);
 }
-}
+} // namespace example
index c43a88fc31c157a8c934d610f505c5a9156d90cd..28d547afe5dce2011721e73fe69ef5aa70f22355 100644 (file)
@@ -34,4 +34,4 @@ class ExampleObject {
  private:
   std::string value_;
 };
-}
+} // namespace example
index dfc523de4cb52b025c8f10bbec6d060a91bda9c1..7da2ba4eb23dd4483b9300b7e996f2a48c789a8e 100644 (file)
@@ -38,4 +38,4 @@ std::string loggingFormatPrintf(const char* format, ...) noexcept {
         "error formatting printf-style log message: ", format);
   }
 }
-}
+} // namespace folly
index 373b0586aa5a04b2e43bf74c3b4502b65ec3131f..97a984841da6c1feac39f0eab9679399921a165d 100644 (file)
@@ -35,7 +35,7 @@ namespace folly {
 std::string loggingFormatPrintf(
     FOLLY_PRINTF_FORMAT const char* format,
     ...) noexcept FOLLY_PRINTF_FORMAT_ATTR(1, 2);
-}
+} // namespace folly
 
 /**
  * Log a message to the specified logger using a printf-style format string.
index 32dd790d1c7d2e37c61b02b5f530b2e6d01ae3e2..f2a779a7ad4b1c38e1ada4c736e15fae48ed57b5 100644 (file)
@@ -115,7 +115,7 @@ void handleLoggingError(
     std::string&& msg) {
   internalWarnings->emplace_back(std::move(msg));
 }
-}
+} // namespace
 
 TEST(AsyncFileWriter, ioError) {
   // Set the LoggerDB internal warning handler so we can record the messages
@@ -205,7 +205,7 @@ size_t fillUpPipe(int fd) {
 
   return totalBytes;
 }
-}
+} // namespace
 
 TEST(AsyncFileWriter, flush) {
   // Set up a pipe(), then write data to the write endpoint until it fills up
index 7b804c900cbf1d8bde57991cf325b8954792f53f..3d65511f4e64dcb1d54300de455bdfeae66ee80f 100644 (file)
@@ -57,7 +57,7 @@ class InitChecker {
 };
 
 static InitChecker initChecker;
-}
+} // namespace
 
 namespace {
 int runHelper() {
@@ -83,7 +83,7 @@ int runHelper() {
   // should be able to detect that XLOG(FATAL) never returns.  It shouldn't
   // complain that we don't return an integer here.
 }
-}
+} // namespace
 
 std::string fbLogFatalCheck() {
   folly::Logger logger("some.category");
index e52b62df23f7530e89e0a876f3263cffc9a43f10..e37ce410fd737512a35a96ca8cea15edc7028966 100644 (file)
@@ -86,7 +86,7 @@ void handleLoggingError(
     std::string&& msg) {
   internalWarnings->emplace_back(std::move(msg));
 }
-}
+} // namespace
 
 TEST(ImmediateFileWriter, ioError) {
   std::array<int, 2> fds;
index a2b285c469103aa4bfc3ef9eae33056807bd6e17..abd740b60535ed8ee4bbff6c2acdb23cf2010e3a 100644 (file)
@@ -165,7 +165,7 @@ class FormatValue<FormattableButNoToString> {
     throw std::runtime_error("test");
   }
 };
-}
+} // namespace folly
 
 TEST_F(LoggerTest, toStringError) {
   // Use the folly::to<string> log API, with an object that will throw
index 9de6ce43e06a197a045d722ebbbb8d2a1ba13de9..2c9a65b57dd3422ee20138e1f900a9660d18b22b 100644 (file)
@@ -65,7 +65,7 @@ class TestLogWriter : public LogWriter {
  private:
   std::vector<std::string> messages_;
 };
-}
+} // namespace
 
 TEST(StandardLogHandler, simple) {
   auto writer = make_shared<TestLogWriter>();
index 32cba46b168fb7d2721498e3aa972351447a6e68..c2dd00b9169ccade466bbf12183ebb5afa64ac6a 100644 (file)
@@ -53,4 +53,4 @@ class TestLogHandler : public LogHandler {
   std::vector<std::pair<LogMessage, const LogCategory*>> messages_;
   uint64_t flushCount_{0};
 };
-}
+} // namespace folly
index b24085b425b7e000b49a1a1cd6326b6a54a67a90..c148fb53f96e1d2d2f2b8e5ba0fa75e5d5f05fb6 100644 (file)
@@ -20,4 +20,4 @@ namespace logging_test {
 void testXlogFile1Dbg1(folly::StringPiece msg) {
   XLOG(DBG1) << "file1: " << msg;
 }
-}
+} // namespace logging_test
index db91671a5b922d771275cf7f0dc36040a6fb0cae..697fc7f7603a06f351a48f23241b733446fc2f7f 100644 (file)
@@ -20,4 +20,4 @@ namespace logging_test {
 void testXlogFile2Dbg1(folly::StringPiece msg) {
   XLOG(DBG1, "file2: ", msg);
 }
-}
+} // namespace logging_test
index 262989e52afd1393a4b8628a2d0a71a169c58dc1..63dac93c3f271295ac87a876a6db6028875b957a 100644 (file)
@@ -32,4 +32,4 @@ inline void testXlogHdrLoop(size_t numIters, folly::StringPiece arg) {
 // Prototypes for functions defined in XlogFile1.cpp and XlogFile2.cpp
 void testXlogFile1Dbg1(folly::StringPiece msg);
 void testXlogFile2Dbg1(folly::StringPiece msg);
-}
+} // namespace logging_test
index 93735a6c5804442e2e3fe0ccdca21c8cec680055..80dec142189a81341f682cade799c435f2290d41 100644 (file)
@@ -22,4 +22,4 @@ namespace logging_test {
 inline void testXlogHdrFunction(folly::StringPiece str, int value) {
   XLOG(DBG3, "test: ", str, "=", value);
 }
-}
+} // namespace logging_test
index 42e25649d9533576f36a10a94b8975171f654196..e5c8e5b781e12a64b65972828ddfd705aaa8d837 100644 (file)
@@ -132,4 +132,4 @@ LogLevel XlogLevelInfo<false>::loadLevelFull(
 // compiled or not.
 template class XlogLevelInfo<true>;
 template class XlogCategoryInfo<true>;
-}
+} // namespace folly
index a8abbd50102fd408f819a8f2c0e8500b6bdcaa3b..f8fc4355552255369a320ea82966fcb4adadb23e 100644 (file)
@@ -381,7 +381,7 @@ class XlogCategoryInfo<false> {
  * XLOG_SET_CATEGORY_NAME() has not been used.
  */
 std::string getXlogCategoryNameForFile(folly::StringPiece filename);
-}
+} // namespace folly
 
 /*
  * We intentionally use an unnamed namespace inside a header file here.
@@ -440,5 +440,5 @@ constexpr inline bool isXlogCategoryOverridden(T) {
  * statement.
  */
 ::folly::XlogFileScopeInfo xlogFileScopeInfo;
-}
-}
+} // namespace xlog_detail
+} // namespace
index 14d3339ae4048cadbe5447129a8599690baf860b..70e5b8bc800063290725a86b7fedcde40d72033f 100644 (file)
@@ -157,5 +157,5 @@ ObserverCreator<Observable, Traits>::getObserver()&& {
 
   return observer;
 }
-}
-}
+} // namespace observer
+} // namespace folly
index b2e38c123ed4e26e1026df0321b0ddb66128b36c..9dd439282e69ef2ecd3b287ad1469f2f8020e625 100644 (file)
@@ -54,7 +54,7 @@ class ObserverCreator {
 
   std::shared_ptr<Context> context_;
 };
-}
-}
+} // namespace observer
+} // namespace folly
 
 #include <folly/experimental/observer/Observable-inl.h>
index bdc62a092f6c1af3a1bae244b8f7f124b028267c..ffcf82880f41139dbb3d4fcb78cc0eb0035cac58 100644 (file)
@@ -72,5 +72,5 @@ const Snapshot<T>& TLObserver<T>::getSnapshotRef() const {
 
   return snapshot;
 }
-}
-}
+} // namespace observer
+} // namespace folly
index 192293e5c0389e9c4b58287bad098e266644a98f..aa1f200f203edf731746b91a889e9727830a1f24 100644 (file)
@@ -201,7 +201,7 @@ struct ObserverTraits<T, true> {
 
 template <typename T, bool CacheInThreadLocal>
 using ObserverT = typename ObserverTraits<T, CacheInThreadLocal>::type;
-}
-}
+} // namespace observer
+} // namespace folly
 
 #include <folly/experimental/observer/Observer-inl.h>
index 07e1d81846b2574f36554f0f58bfaf8536065094..7aaa521877e1461237bc2f4e0e7dc77165deb0bb 100644 (file)
@@ -78,5 +78,5 @@ Observer<T> SimpleObservable<T>::getObserver() {
   });
   return *observer_;
 }
-}
-}
+} // namespace observer
+} // namespace folly
index 55803ca75551d8c7088f335c437c16c21eb01a5d..38367b55d6a93e5b453b3602e79cffe529fa1ecb 100644 (file)
@@ -44,7 +44,7 @@ class SimpleObservable {
   std::once_flag observerInit_;
   folly::Optional<Observer<T>> observer_;
 };
-}
-}
+} // namespace observer
+} // namespace folly
 
 #include <folly/experimental/observer/SimpleObservable-inl.h>
index f244ea6fe26ad567d3f5068e700e5967b89e7469..c692c04a55ca51414ea6e1649e4bc1466369cfd0 100644 (file)
@@ -178,5 +178,5 @@ void Core::removeStaleDependents() {
     }
   });
 }
-}
-}
+} // namespace observer_detail
+} // namespace folly
index aa8f86492aaf4c7cc20c7dffdc7fbdc119bb828d..2636ef21014c32a95e7eb5cb46c5b8eeccd57ea5 100644 (file)
@@ -111,5 +111,5 @@ class Core : public std::enable_shared_from_this<Core> {
 
   std::mutex refreshMutex_;
 };
-}
-}
+} // namespace observer_detail
+} // namespace folly
index e785e0823cce7b184079136bfe11bd5a4fcfbcd0..07c27984fc2e2056c5197dc7801a9e106222f358 100644 (file)
@@ -76,5 +76,5 @@ class GraphCycleDetector {
 
   std::unordered_map<NodeId, NodeSet> edges_;
 };
-}
-}
+} // namespace observer_detail
+} // namespace folly
index 94015308b231ad7d6e9cdc3107343c7988eed472..6662488683fd0816ffb03b886cdee43a15afab03 100644 (file)
@@ -41,5 +41,5 @@ using ResultOf =
 template <typename F>
 using ResultOfUnwrapSharedPtr =
     typename UnwrapSharedPtr<typename std::result_of<F()>::type>::type;
-}
-}
+} // namespace observer_detail
+} // namespace folly
index e9312db566be4745619059a79b3a0488abd7a1ec..754e0c520ee118d0bae5ccce75471359d1b82d1e 100644 (file)
@@ -40,7 +40,7 @@ static constexpr StringPiece kObserverManagerThreadNamePrefix{"ObserverMngr"};
 namespace {
 constexpr size_t kCurrentQueueSize{10 * 1024};
 constexpr size_t kNextQueueSize{10 * 1024};
-}
+} // namespace
 
 class ObserverManager::CurrentQueue {
  public:
@@ -201,5 +201,5 @@ folly::Singleton<ObserverManager> ObserverManager::Singleton::instance(
 std::shared_ptr<ObserverManager> ObserverManager::getInstance() {
   return Singleton::instance.try_get();
 }
-}
-}
+} // namespace observer_detail
+} // namespace folly
index cfb1e70a05eef1a04c46e2bf8c98dbc9b534ca0d..19b621afd1eb2e817240aac9de4bf6ada8eb65b6 100644 (file)
@@ -215,5 +215,5 @@ class ObserverManager {
   using CycleDetector = GraphCycleDetector<const Core*>;
   folly::Synchronized<CycleDetector, std::mutex> cycleDetector_;
 };
-}
-}
+} // namespace observer_detail
+} // namespace folly
index 19a556cf1ba961566ee21e72a0a5e76bebc9896b..95eac1270d4781f084a54b27ed0c337a6672740e 100644 (file)
@@ -375,4 +375,5 @@ void bmJumpTo(const List& list, const std::vector<uint32_t>& data,
   }
 }
 
-}}  // namespaces
+} // namespace compression
+} // namespace folly
index 28e5e5e8d4799d448253d182051f0eba6c9ae0e7..9b2048a8a54626698b52cc1741b39b5d5f4b9edd 100644 (file)
@@ -127,4 +127,5 @@ TEST(ProgramOptionsTest, Aliases) {
                   "a", "b"}));
 }
 
-}}  // namespaces
+} // namespace test
+} // namespace folly
index 2a662af5565e6a4a1ad2b2e02107d606cb16b841..14cb1e498f9b2f376c33e844063530397612d7c1 100644 (file)
@@ -174,4 +174,5 @@ TEST(ProgramOptionsTest, GNUStyleSubCommandUnrecognizedOptionFirst) {
           "-xy"}));
 }
 
-}}  // namespaces
+} // namespace test
+} // namespace folly
index 4072890537a6c38a3fcc1791ced5625cb83287a2..4807846852f70e66d3dfc456a7155ff6c196d92d 100644 (file)
@@ -83,7 +83,7 @@ BENCHMARK(TLRefCountFourThreads, n) {
   benchmark<TLRefCount, 4>(n);
 }
 
-}
+} // namespace folly
 
 int main(int argc, char** argv) {
   gflags::ParseCommandLineFlags(&argc, &argv, true);
index 65c338a52a27beca1d68942c5477a615a882e58f..a63de14d26414cb85db4cef938158b3a11b60148 100644 (file)
@@ -131,4 +131,4 @@ TEST(TLRefCount, Stress) {
   // do it that many times.
   stressTest<TLRefCount>(500);
 }
-}
+} // namespace folly
index 586a6549117420e0b661062fe6bfe824e8984af2..53959e142dd328db011120a86258e9ca6d0f3b78 100644 (file)
@@ -148,4 +148,5 @@ TEST(TupleOps, TupleTo2) {
 
 #undef CHECK_TUPLE_TO
 
-}}  // namespaces
+} // namespace test
+} // namespace folly
index 79237cf75f509a8e5ed88eeeee399f12aaf7f3e8..b7792256a364944df941dd63e13e2db0441307b3 100644 (file)
@@ -127,5 +127,5 @@ addTasks(InputIterator first, InputIterator last) {
 
   return std::move(iterator);
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 936ed221a397efa47e4dcb6a6f550fa7a32281eb..6b95a543520a2a73e5491d6888c13f759018e8f9 100644 (file)
@@ -128,7 +128,7 @@ class TaskIterator {
 
   folly::Try<T> awaitNextResult();
 };
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include <folly/fibers/AddTasks-inl.h>
index dd2149cb1c893e8fde6417e33340c27f8fb5789b..60786808254476d7455c9696b5d9cbfb8ed4fb45 100644 (file)
@@ -135,5 +135,5 @@ class BatchDispatcher {
   ExecutorT& executor_;
   std::shared_ptr<DispatchState> state_;
 };
-}
-}
+} // namespace fibers
+} // namespace folly
index ee753ed3c5972786dc1883c4f139f5fcbff7d5c0..fe9d45a0d852b4d7ffb03c29cd5ec55c3268d190 100644 (file)
@@ -109,5 +109,5 @@ bool Baton::timed_wait(const std::chrono::time_point<C, D>& timeout) {
     return timed_wait(TimeoutController::Duration(0));
   }
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 7dca7e0277ec3bd3f91f1a00573a6b24310f3790..733147af2cf469c1adaf5bc5e91ed0ed1813a739 100644 (file)
@@ -193,5 +193,5 @@ void Baton::TimeoutHandler::cancelTimeout() {
     fiberManager_->timeoutManager_->cancel(timeoutPtr_);
   }
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 9fd8c324bfcb9dc5e880367b6337ee13cf289af3..768da60f9a9068f8e550e49e637a6fef586cf0e8 100644 (file)
@@ -185,7 +185,7 @@ class Baton {
     } futex_;
   };
 };
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include <folly/fibers/Baton-inl.h>
index 10a2e64b4894a2d1febdec45f4e585342b8613ab..afc05200a878ee6b34ef491eb87721b29724eae4 100644 (file)
@@ -235,5 +235,5 @@ void* Fiber::LocalData::allocateHeapBuffer(size_t size) {
 void Fiber::LocalData::freeHeapBuffer(void* buffer) {
   delete[] reinterpret_cast<char*>(buffer);
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 36af25ebb0862c2636480c61d96fc7c62c3d4352..93ce8568e6c6e9aed683efc80cb806d7782a68f8 100644 (file)
@@ -183,7 +183,7 @@ class Fiber {
   size_t asanMainStackSize_{0};
 #endif
 };
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include <folly/fibers/Fiber-inl.h>
index df95065211254f5d5604d0c92e1356796d7523ff..e8ddde619c2b364918564002b8f567c73c990295 100644 (file)
@@ -50,5 +50,5 @@ auto FiberManager::addTaskRemoteFuture(F&& func) -> folly::Future<
       });
   return f;
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 9155078c42364869d21cf93d5fc58f672f0b70b5..3c01ce17245fa0e033a2f41606d257ab81d68d83 100644 (file)
@@ -354,7 +354,7 @@ class ScopedAlternateSignalStack {
   using AltStackBuffer = std::array<char, kAltStackSize>;
   std::unique_ptr<AltStackBuffer> stack_;
 };
-}
+} // namespace
 
 void FiberManager::registerAlternateSignalStack() {
   static folly::SingletonThreadLocal<ScopedAlternateSignalStack> singleton;
@@ -363,5 +363,5 @@ void FiberManager::registerAlternateSignalStack() {
   alternateSignalStackRegistered_ = true;
 }
 #endif
-}
-}
+} // namespace fibers
+} // namespace folly
index 20aa1d9d756d576b45ba2132cb06ca0cdcc8d42b..e8b36ccb4f2edbf869d881d76c9f9ec70d47af9a 100644 (file)
@@ -541,5 +541,5 @@ typename FirstArgOf<F>::type::value_type inline await(F&& func) {
 
   return Promise<Result, BatonT>::await(std::forward<F>(func));
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index f94478944f8e1345d6f32899704364ec73c8a17f..508967c5c34760d58febdf99be43faebdd4b0747 100644 (file)
@@ -576,7 +576,7 @@ inline void yield() {
     std::this_thread::yield();
   }
 }
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include <folly/fibers/FiberManagerInternal-inl.h>
index a4d75bf80f746a372b45919c46b571890562bd79..767bc13e878ac83758596c29dc9501d667b51573 100644 (file)
@@ -191,5 +191,5 @@ FiberManager& getFiberManager(
     const FiberManager::Options& opts) {
   return ThreadLocalCache<VirtualEventBase>::get(evb, opts);
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index bda29d7033114a7f09fc32009b860116e840b274..a6cbb4901efce2dd1d5fee49c9b06903c4ad9d87 100644 (file)
@@ -29,5 +29,5 @@ FiberManager& getFiberManager(
 FiberManager& getFiberManager(
     folly::VirtualEventBase& evb,
     const FiberManager::Options& opts = FiberManager::Options());
-}
-}
+} // namespace fibers
+} // namespace folly
index 1e0fa9f6d3435ada9731c341537a4fb3e439a3e1..93dbebaea6d331ed7ab87e38ca0bd0d1f0c4e9e2 100644 (file)
@@ -23,5 +23,5 @@ namespace folly {
 namespace fibers {
 
 typedef Baton GenericBaton;
-}
-}
+} // namespace fibers
+} // namespace folly
index 0c3be85d74aba8108a2e79514f4c124c8f74eaa2..02728420ed64f05dfe661b3674f23f7eb17b2ecf 100644 (file)
@@ -230,7 +230,7 @@ void installSignalHandler() {
     sigaction(SIGSEGV, &sa, &oldSigsegvAction);
   });
 }
-}
+} // namespace
 
 #endif
 
index c34381c67de0699eee4b1ea1024611ba34d4eec9..39fd58f620e4ce41904ee9f2e213cc3462c64a9a 100644 (file)
@@ -112,5 +112,5 @@ typename Promise<T, BatonT>::value_type Promise<T, BatonT>::await(F&& func) {
 
   return std::move(result).value();
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index f42d62d1504f5c3b9fdee4fbc60f1c813693e95c..c87faf9f78a8af1ca03d2a6c8e593c204fa93444 100644 (file)
@@ -99,7 +99,7 @@ class Promise {
       std::is_same<T, void>::value>::type
   fulfilHelper(F&& func);
 };
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include <folly/fibers/Promise-inl.h>
index a6db21ab9e4a1ec790547fbf3556247939b4e279..de5621bd598e164ae38c7dae733e4d4fe9cd059f 100644 (file)
@@ -333,5 +333,5 @@ void TimedRWMutex<BatonType>::downgrade() {
     }
   }
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 671409a0c39364b1f08da8fb7d69e8d434c78619..f965abe078bfb140b40b8b0beda600df494607b6 100644 (file)
@@ -228,7 +228,7 @@ class TimedRWMutex {
   MutexWaiterList read_waiters_; //< List of thread / fibers waiting for
   //  shared access
 };
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include "TimedMutex-inl.h"
index f1bf711b9aa874fcf38024e74b07ed527c88228d..df91aecbed42a82cb5c7f5084503e5c7411c10eb 100644 (file)
@@ -104,5 +104,5 @@ void TimeoutController::cancel(intptr_t p) {
     list.pop();
   }
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index 5e4b04c9dcbc88df4fa517d67aa383afcbc37ca4..0dde5e3098258c4fd85b182425343f351cf054f6 100644 (file)
@@ -67,5 +67,5 @@ class TimeoutController
   TimePoint nextTimeout_;
   LoopController& loopController_;
 };
-}
-}
+} // namespace fibers
+} // namespace folly
index 66b30042e5a310c81b98b0709bfaf876b748b658..38453d34fcc29d4a164c8a8c84c5ce44f2b73fa8 100644 (file)
@@ -204,5 +204,5 @@ typename std::enable_if<
   assert(result.size() == 1);
   return std::move(result[0]);
 }
-}
-}
+} // namespace fibers
+} // namespace folly
index ef40206ddd14b824de6fd59f3e37b7aaaf4f1273..a6de6b58099ec7b1256b4c7be195963a1d3e5db1 100644 (file)
@@ -139,7 +139,7 @@ typename std::enable_if<
             typename std::iterator_traits<InputIterator>::value_type()>::type,
         void>::value,
     size_t>::type inline collectAny(InputIterator first, InputIterator last);
-}
-}
+} // namespace fibers
+} // namespace folly
 
 #include <folly/fibers/WhenN-inl.h>
index 847149f800eed20d615a2a5907bd6373c48d2983..1dad237a33ca456709141f55942c8dd59583dc31 100644 (file)
@@ -914,7 +914,7 @@ void expectMainContext(bool& ran, int* mainLocation, int* fiberLocation) {
   EXPECT_FALSE(ran);
   ran = true;
 }
-}
+} // namespace
 
 TEST(FiberManager, runInMainContext) {
   FiberManager manager(std::make_unique<SimpleLoopController>());
index cce6fec07d6e3e23bf0e6a574f8ac352535953db..8bf39fdd436274fc758c1374f7dd62bd1a367e5c 100644 (file)
@@ -161,4 +161,4 @@ auto uncurry(F&& f)
 }
 
 //////////////////////////////////////////////////////////////////////
-}
+} // namespace folly
index e661e4793ec3f4cd217a1731618fee4da45e3a8f..208426bfcacda73ae0e265a9a46d06f8ac6d63e9 100644 (file)
@@ -123,7 +123,7 @@ struct Mover {
 
 void move_only_func(Mover&&) {}
 
-}
+} // namespace
 
 TEST(ApplyTuple, Test) {
   auto argsTuple = std::make_tuple(1, 2, 3.0);
index 62d1113ea1ae1e084bae1e6638658e0f9450acb6..72714cbdaae78e027eb512ad3070c93d726cbc5f 100644 (file)
@@ -105,4 +105,5 @@ folly::Future<bool> Barrier::wait() {
   return future;
 }
 
-}}  // namespaces
+} // namespace futures
+} // namespace folly
index 32f03fba2ffff9a67e0d65c9216b1ae04aaf5619..80589c4653d38eba1c54d396d4f5ae6d78f0fa4d 100644 (file)
@@ -93,4 +93,5 @@ class Barrier {
   std::atomic<ControlBlock*> controlBlock_;
 };
 
-}}  // namespaces
+} // namespace futures
+} // namespace folly
index b903a644644640124d0685495c7a43df46d8b45c..7c8c7af6eaf9db98d1a1d36a68ec81f7003c4025 100644 (file)
@@ -1466,15 +1466,15 @@ Future<Unit> times(const int n, F&& thunk) {
 }
 
 namespace futures {
-  template <class It, class F, class ItT, class Result>
-  std::vector<Future<Result>> map(It first, It last, F func) {
-    std::vector<Future<Result>> results;
-    for (auto it = first; it != last; it++) {
-      results.push_back(it->then(func));
-    }
-    return results;
+template <class It, class F, class ItT, class Result>
+std::vector<Future<Result>> map(It first, It last, F func) {
+  std::vector<Future<Result>> results;
+  for (auto it = first; it != last; it++) {
+    results.push_back(it->then(func));
   }
+  return results;
 }
+} // namespace futures
 
 // Instantiate the most common Future types to save compile time
 extern template class Future<Unit>;
index 339e6a12a4caabb441a04a5c521ff8fcfe2d76e1..86514b07ea9b61e45c2b7e941f48321c3f5d6d2c 100644 (file)
@@ -158,4 +158,4 @@ struct Extract<R (&)(Args...)> {
 
 class Timekeeper;
 
-} // namespace
+} // namespace folly
index 33eb9b94efee58de01e3e466a8ecff30227cb12e..c4f19a760b34d695c54a706fcd5bff8bc9db83d4 100644 (file)
@@ -33,7 +33,7 @@ template class Future<int>;
 template class Future<int64_t>;
 template class Future<std::string>;
 template class Future<double>;
-}
+} // namespace folly
 
 namespace folly { namespace futures {
 
@@ -51,4 +51,5 @@ Future<Unit> sleep(Duration dur, Timekeeper* tk) {
   return tk->after(dur);
 }
 
-}}
+} // namespace futures
+} // namespace folly
index da7b60b50060fda1e8a5a2fb37ecd5330e52b107..ecbf03da3c5f4bda7233e67dcdf5d65cbf39e517 100644 (file)
@@ -45,4 +45,4 @@ namespace folly {
 [[noreturn]] void throwNoFutureInSplitter() {
   throw NoFutureInSplitter();
 }
-}
+} // namespace folly
index 2b95f9a437b1d074123f66b210778d384c241650..9d3bd77dd20c1fbf08024c2dabcd2ca1b7731fa8 100644 (file)
@@ -94,4 +94,4 @@ class FOLLY_EXPORT NoTimekeeper : public FutureException {
  public:
   NoTimekeeper() : FutureException("No timekeeper available") {}
 };
-}
+} // namespace folly
index e930555fd01c76bf4b5d3b43fe3b39de9dec596a..5f2fe24dea760a5c3a32698f552b0970dfad305d 100644 (file)
@@ -73,4 +73,4 @@ template <class T>
 FutureSplitter<T> splitFuture(Future<T>&& future) {
   return FutureSplitter<T>{std::move(future)};
 }
-}
+} // namespace folly
index 7471228c4e2719db43c6af234a40b6994a9db3f4..5c06d3035a543f40c680aea8cc581c1f3394541f 100644 (file)
@@ -145,4 +145,4 @@ bool Promise<T>::isFulfilled() const noexcept {
   return true;
 }
 
-}
+} // namespace folly
index 6802d4d00cb3d8e00ecfa538fe990c17d83edc01..905ce5dd7eb9a4a1d23864aed407381920ad3728 100644 (file)
@@ -128,7 +128,7 @@ class Promise {
   void detach();
 };
 
-}
+} // namespace folly
 
 #include <folly/futures/Future.h>
 #include <folly/futures/Promise-inl.h>
index c7b6e5adf2852159e6fcf49bb125ce4e020c6166..362736ec031c197dd75527efa67299c4424b6a0b 100644 (file)
@@ -135,4 +135,4 @@ bool SharedPromise<T>::isFulfilled() {
   return hasValue_;
 }
 
-}
+} // namespace folly
index 44987eaf02f82f24be51f40d41d266c74cc716be..d3b363efb4c5efd8a444f6bcf3c3773e27a4e5ac 100644 (file)
@@ -116,7 +116,7 @@ class SharedPromise {
   std::function<void(exception_wrapper const&)> interruptHandler_;
 };
 
-}
+} // namespace folly
 
 #include <folly/futures/Future.h>
 #include <folly/futures/SharedPromise-inl.h>
index 163ef0060bc83dea6cf8996c298cb9b5c7ce12ab..87731881fe37e37a47136d5e2b8233fccdc234c8 100644 (file)
@@ -35,4 +35,4 @@ namespace folly {
 ///   futures::sleep(std::chrono::seconds(1));
 using Duration = std::chrono::milliseconds;
 
-}
+} // namespace folly
index 3fa3cc05ee33fc89cb26685c6316c41b24be76e0..3f645c5059686ca74a9cf8b793e86af3ac592d47 100644 (file)
@@ -168,4 +168,6 @@ TEST(BarrierTest, Random) {
   }
 }
 
-}}}  // namespaces
+} // namespace test
+} // namespace futures
+} // namespace folly
index 98fa9fdf4c90f7bccd5eba63333314a10be09416..e122c4b5c0af66317fcdc6b484a3f70042675ccf 100644 (file)
@@ -72,7 +72,7 @@ class CallbackLifetimeTest : public testing::Test {
 
   TestExecutor executor{2}; // need at least 2 threads for internal futures
 };
-}
+} // namespace
 
 TEST_F(CallbackLifetimeTest, thenReturnsValue) {
   auto c = mkC();
index 37613cc0fd6cdd065ad3c23d21c1388845368102..4c447ce16abe99624ba3adce49f354eb99759671 100644 (file)
@@ -37,7 +37,7 @@ struct Widget {
     return v_;
   }
 };
-}
+} // namespace
 
 TEST(ConverstionOperator, DirectInitialization) {
   auto future = makeFuture<Widget>(23);
index 5f097ce5be5c91c30a0b6974df89cc5fc34bee2d..08b712e6bb969569197057e17d4d82a10a705b79 100644 (file)
@@ -88,7 +88,7 @@ Future<int> onErrorHelperEggs(const eggs_t&) {
 Future<int> onErrorHelperGeneric(const std::exception&) {
   return makeFuture(20);
 }
-}
+} // namespace
 
 TEST(Future, onError) {
   bool theFlag = false;
index 886e73345e810a488f258c2a10c909538c311a3d..3da92660fb8dbd673fd6c8e6730ad28b4a52f47a 100644 (file)
@@ -95,4 +95,4 @@ class SomeClass {
   }
 };
 
-}
+} // namespace folly
index ae52706b8598bed69e80470472f4cc50e00649e8..0bdd9ad5f7ffd76b265997086d7f4ba936fbbb50 100644 (file)
@@ -36,7 +36,7 @@ struct Widget {
     throw std::logic_error("unexpected move assignment");
   }
 };
-}
+} // namespace
 
 TEST(Then, tryConstructor) {
   auto t = Try<Widget>(23);
index 6e39e03f3ae539d4559b4ca672879c3f5a94a702..8869517ef9b5f4c8d80e1ab2a0169c1268e7d6f2 100644 (file)
@@ -2332,7 +2332,7 @@ const T& operator|(const Optional<T>& opt, const Unwrap&) {
   return opt.value();
 }
 
-} //::detail
+} // namespace detail
 
 /**
  * VirtualGen<T> - For wrapping template types in simple polymorphic wrapper.
index b760aef3c562603b951dbb14dd6655a3f2372ba8..a550393554a6fa490b633753886b1b417c03ee97 100644 (file)
@@ -407,7 +407,7 @@ class UnwrapOr;
 
 class Unwrap;
 
-}
+} // namespace detail
 
 /**
  * Polymorphic wrapper
index d098dbd0f7ff89b30b7f0e42a4d65235d35f27ab..a64e896a7107ec736612d7ff71e9c06286e9945d 100644 (file)
@@ -129,7 +129,7 @@ inline auto byLineImpl(File file, char delim, bool keepDelimiter)
     | resplit(delim, keepDelimiter);
 }
 
-} // !detail
+} // namespace detail
 
 /**
  * Generator which reads lines from a file.
@@ -161,5 +161,5 @@ inline auto byLine(int fd, char delim = '\n')
 
 inline auto byLine(const char* f, char delim = '\n')
   -> decltype(byLine(File(f), delim)) { return byLine(File(f), delim); }
-} // !gen
-} // !folly
+} // namespace gen
+} // namespace folly
index 4157a07d5dbd6351d7d59fb0de97d89050fabd07..b629ad080c40c1bf5d5bc08ede28df42e000520a 100644 (file)
@@ -64,7 +64,7 @@ template <class S = detail::FileWriter>
 S toFile(File file, std::unique_ptr<IOBuf> buffer) {
   return S(std::move(file), std::move(buffer));
 }
-} // !gen
-} // !folly
+} // namespace gen
+} // namespace folly
 
 #include <folly/gen/File-inl.h>
index db089fe6dfb68859387f09a05eb9cc002a1b7d30..6330a05a54b455361fef9f0f8b426671371fde52 100644 (file)
@@ -34,7 +34,7 @@ class Sub;
 template <class Iterator>
 class ChunkedRangeSource;
 
-}
+} // namespace detail
 
 /**
  * chunked() - For producing values from a container in slices.
@@ -105,7 +105,7 @@ template <class Sink, class Sub = detail::Sub<Sink>>
 Sub sub(Sink sink) {
   return Sub(std::move(sink));
 }
-} // !namespace gen
-} // !namespace folly
+} // namespace gen
+} // namespace folly
 
 #include <folly/gen/Parallel-inl.h>
index 3948168d184cbeb52039234621c71ecb0b4397fe..2636ba1674912819e68134a24ec381e2e6c4c6aa 100644 (file)
@@ -1168,7 +1168,7 @@ bool operator==(const DereferenceWrapper& a, const DereferenceWrapper& b) {
 void PrintTo(const DereferenceWrapper& a, std::ostream* o) {
   *o << "Wrapper{\"" << cEscape<string>(a.data) << "\"}";
 }
-}
+} // namespace
 
 TEST(Gen, DereferenceWithLValueRef) {
   auto original = vector<DereferenceWrapper>{{"foo"}, {"bar"}};
index bf141867a5732e86c15c18babe1d8f723953cd2a..d124b297e893e08a4d8420cb023e58d97144e2df 100644 (file)
@@ -273,5 +273,5 @@ _128_bits_at_a_time:
 }
 
 #endif
-}
-} // namespace
+} // namespace detail
+} // namespace folly
index 05a6f22c8310dfbf275941e83ec20b19e9e9f4cf..62c9048911a6347e4d1ef9a0e631e5215fedc334 100644 (file)
@@ -97,4 +97,5 @@ bool crc32_hw_supported();
  */
 uint32_t
 crc32_sw(const uint8_t* data, size_t nbytes, uint32_t startingChecksum = ~0U);
-}} // folly::detail
+} // namespace detail
+} // namespace folly
index 50f132e5ba4f59f4e73b77498086a7c09ecb34c1..7a4c5b46b5b8af681e7dd303ac87693ac5ae9578 100644 (file)
@@ -54,4 +54,4 @@ void init(int* argc, char*** argv, bool removeFlags) {
   folly::symbolizer::installFatalSignalCallbacks();
 #endif
 }
-} //!folly
+} // namespace folly
index 4bb8a9b43525a37d0f80d95d20b4f357f365003b..2001f30684ab86580cbf209a709db100e614d846 100644 (file)
@@ -1962,4 +1962,4 @@ void AsyncSSLSocket::getSSLServerCiphers(std::string& serverCiphers) const {
   }
 }
 
-} // namespace
+} // namespace folly
index 8de643b82ea3fd346387d13fadee17f7485cd246..1f1d679842608889093099661617973e8d646233 100644 (file)
@@ -925,4 +925,4 @@ class AsyncSSLSocket : public virtual AsyncSocket {
   bool sessionIDResumed_{false};
 };
 
-} // namespace
+} // namespace folly
index a6fbe6fe28f73ae4e60d71b1d01785c9b07c170c..86cf3b77765035189dde7535bba8ef435e25b1bf 100644 (file)
@@ -237,7 +237,7 @@ int AsyncSocket::SendMsgParamsCallback::getDefaultFlags(
 
 namespace {
 static AsyncSocket::SendMsgParamsCallback defaultSendMsgParamsCallback;
-}
+} // namespace
 
 AsyncSocket::AsyncSocket()
     : eventBase_(nullptr),
index b7a8ccaf605b4210559f1f1257b9edf5905bc96f..edd4afce73f76688d86cd78012cd059ac2e14df0 100644 (file)
@@ -27,4 +27,4 @@ class AsyncSocketBase {
   virtual void getAddress(SocketAddress*) const = 0;
 };
 
-} // namespace
+} // namespace folly
index 65de4b78be89a54e5c1a7369f03fa909134f3a74..be74f7b6acbc2a99de770bc5ce31cc4757921c19 100644 (file)
@@ -195,4 +195,4 @@ class DecoratedAsyncTransportWrapper : public folly::AsyncTransportWrapper {
   typename T::UniquePtr transport_;
 };
 
-}
+} // namespace folly
index 4e5346fba84be91b9376fc7c1e5215b5b871783d..d4d80712d65442f1c7df879c0b063e1c92e0e4fa 100644 (file)
@@ -133,4 +133,4 @@ class DestructorCheck {
   ForwardLink rootGuard_;
 };
 
-}
+} // namespace folly
index 1454c847fa0b2ca6d689092c58f5552e0020b56b..83e43cb4f63701bdacf9625114d85c934f0132be 100644 (file)
@@ -62,7 +62,7 @@ class EventBaseLocalBaseBase {
   virtual void onEventBaseDestruction(EventBase& evb) = 0;
   virtual ~EventBaseLocalBaseBase() = default;
 };
-}
+} // namespace detail
 template <typename T>
 class EventBaseLocal;
 
index cf5cf6f86e123f0f23eb399a812a5f177e152a09..cda6311375a7621bcac8d462691ffd69a7a0d5f6 100644 (file)
@@ -70,4 +70,5 @@ void EventBaseLocalBase::setVoid(EventBase& evb, std::shared_ptr<void>&& ptr) {
 }
 
 std::atomic<uint64_t> EventBaseLocalBase::keyCounter_{0};
-}}
+} // namespace detail
+} // namespace folly
index 703e6849a81d9019c5839257c7a19904d893f2f1..8e4bdce3b77b4b98bb6b90a75e47f84db07cb8ae 100644 (file)
@@ -44,7 +44,7 @@ class EventBaseLocalBase : public EventBaseLocalBaseBase, boost::noncopyable {
   uint64_t key_{keyCounter_++};
 };
 
-}
+} // namespace detail
 
 /**
  * A storage abstraction for data that should be tied to an EventBase.
@@ -116,5 +116,4 @@ class EventBaseLocal : public detail::EventBaseLocalBase {
   }
 };
 
-
-}
+} // namespace folly
index fb529eed9195115d886d122caf39a79d5b8a6de0..c4b25c94795154467f6b1ea6f0f2d7ea89dfc05f 100644 (file)
@@ -60,4 +60,4 @@ void EventBaseThread::start(folly::StringPiece threadName) {
 void EventBaseThread::stop() {
   th_ = nullptr;
 }
-}
+} // namespace folly
index 41940d68e7e7d85a270b59a219b04c2c5a07bfb2..a8c3d3074d6d3c4b968a43ecdcd4070fd69c337a 100644 (file)
@@ -51,4 +51,4 @@ class EventBaseThread {
   EventBaseManager* ebm_;
   std::unique_ptr<ScopedEventBaseThread> th_;
 };
-}
+} // namespace folly
index 11894b5d04eac9067ec1d3c243cc24ef624e08f0..aff3fa6b3eb00a9f771165e952680d03cb84606a 100644 (file)
@@ -130,4 +130,4 @@ RequestContext* RequestContext::get() {
   }
   return context.get();
 }
-}
+} // namespace folly
index a4b7a23a17d78aadd340ede0b697fa7bf10b7be2..ce733301345303e319790e29d1af0be031f57d7a 100644 (file)
@@ -128,4 +128,4 @@ class RequestContextScopeGuard {
     RequestContext::setContext(std::move(prev_));
   }
 };
-}
+} // namespace folly
index 8cd974376c4da1b1d2f383467a6b8b7d8494218d..771db00feb536b9a4b15995061732735b7cc50e1 100644 (file)
@@ -25,7 +25,7 @@ namespace ssl_options_detail {
 void logDfatal(std::exception const& e) {
   LOG(DFATAL) << exceptionStr(e);
 }
-}
+} // namespace ssl_options_detail
 
 constexpr std::array<const char*, 12> SSLCommonOptions::kCipherList;
 constexpr std::array<const char*, 8> SSLCommonOptions::kSignatureAlgorithms;
index 233c3622cd0a13f9f0633c171623ae2cb542b1dd..a808d55771d14603d630890bab222308f2639425 100644 (file)
@@ -24,7 +24,7 @@ namespace ssl {
 
 namespace ssl_options_detail {
 void logDfatal(std::exception const&);
-}
+} // namespace ssl_options_detail
 
 struct SSLCommonOptions {
   /**
index 7ffaae6270d2d9f55a689653a6793e45900dcf4b..bf359f90879c0e57369d84317910f3aa4f28ae45 100644 (file)
@@ -71,4 +71,4 @@ ScopedEventBaseThread::~ScopedEventBaseThread() {
   th_.join();
 }
 
-}
+} // namespace folly
index 0c6808e63bb42423bfa0c2bf532d8fe812c31b38..c81ab3930410b0fb9b53fc891fb9e4320a657745 100644 (file)
@@ -69,4 +69,4 @@ class ScopedEventBaseThread {
   folly::Baton<> stop_;
 };
 
-}
+} // namespace folly
index 23f719f998282a7b6b043f66f886e71ab37e6032..a6b3c1f41aedb05d98174650495f99386df13ffa 100644 (file)
@@ -113,4 +113,4 @@ void TimeoutManager::clearCobTimeouts() {
 TimeoutManager::~TimeoutManager() {
   clearCobTimeouts();
 }
-}
+} // namespace folly
index 46c187b865ac042a6187071c0bb652c3e2f37d6a..23a48317220ecd50c8d3a99e3d75f45a61819599 100644 (file)
@@ -61,4 +61,4 @@ void VirtualEventBase::runOnDestruction(EventBase::LoopCallback* callback) {
     callbacks.push_back(*callback);
   });
 }
-}
+} // namespace folly
index 539e77060a11e9d04918d218551e1616617cf8f9..5120f21efea1e085a1fc8f0fb4ebb135d46bd198 100644 (file)
@@ -179,4 +179,4 @@ class VirtualEventBase : public folly::Executor, public folly::TimeoutManager {
 
   folly::Synchronized<LoopCallbackList> onDestructionCallbacks_;
 };
-}
+} // namespace folly
index db08daab4bf043bdc6a0d0bc497de3c35f5c6b55..aa1346a487a3c0aefba6967f17aebcb67ea569a8 100644 (file)
@@ -71,4 +71,4 @@ class WriteChainAsyncTransportWrapper :
       folly::WriteFlags flags = folly::WriteFlags::NONE) override = 0;
 };
 
-}
+} // namespace folly
index 832818ebb9b966e1c7a88147de09057a48e14d2c..5e197d911332577296bdf12652f9ef49065140a4 100644 (file)
@@ -31,7 +31,7 @@ namespace {
 static int boringssl_bio_fd_should_retry(int err);
 #endif
 
-}
+} // namespace
 
 namespace folly {
 namespace ssl {
@@ -369,4 +369,4 @@ int boringssl_bio_fd_should_retry(int i) {
 
 #endif // OEPNSSL_IS_BORINGSSL
 
-}
+} // namespace
index 0a184c494a872e6745b829f9429a9271a46ada00..99c8130413561111c9c70238b5d3fc3f17dea572 100644 (file)
@@ -98,7 +98,7 @@ AsyncSocketException::AsyncSocketExceptionType exTypefromSSLErr(SSLError err) {
       return AsyncSocketException::SSL_ERROR;
   }
 }
-}
+} // namespace
 
 namespace folly {
 
@@ -127,4 +127,4 @@ SSLException::SSLException(SSLError error)
           getSSLErrorString(error).str(),
           0),
       sslError(error) {}
-}
+} // namespace folly
index 2d37c49c0ab1e80eb73761e4eaaafb501a3712aa..ede3e234e9fd14fe6910407085781c80ce91569a 100644 (file)
@@ -45,4 +45,4 @@ class SSLException : public folly::AsyncSocketException {
  private:
   SSLError sslError;
 };
-}
+} // namespace folly
index d476f885cf21cd3bf9fee24edcbcb24ebe1ea638..10e521107ef54f1feec0ef66b32b60f6f62fb07a 100644 (file)
@@ -2267,7 +2267,7 @@ TEST(AsyncSSLSocketTest, SendMsgDataCallback) {
 
 #endif
 
-} // namespace
+} // namespace folly
 
 #ifdef SIGPIPE
 ///////////////////////////////////////////////////////////////////////////
index cb7ade43336866d9c3071e559a552567182c876e..0ee1287318ea8f4e458bf685a2b3136867aa4722 100644 (file)
@@ -1502,4 +1502,4 @@ class EventBaseAborter : public AsyncTimeout {
   EventBase* eventBase_;
 };
 
-}
+} // namespace folly
index 326a077c85f43166cd528abd6192155743e140e1..3cea20d83dde8fa924915642fbdf3f230506b097 100644 (file)
@@ -396,4 +396,4 @@ TEST_F(AsyncSSLSocketWriteTest, write_with_eor3) {
   sock_->checkEor(0, 0);
 }
 
-}
+} // namespace folly
index 3d6d41d21b7cf30f5dd6db00d87b16d231743e81..66f946af0a62401d9c50065bcccba86fa71322e7 100644 (file)
@@ -31,7 +31,7 @@ class TestSignalHandler : public AsyncSignalHandler {
 
   bool called{false};
 };
-}
+} // namespace
 
 TEST(AsyncSignalHandler, basic) {
   EventBase evb;
index a9f7e46aa12eb450839b9f179bdbb38d2376f31e..e6a52c63e5f679aebcce3591400aec41dba253a2 100644 (file)
@@ -88,4 +88,4 @@ TEST(AsyncSocketTest, duplicateBind) {
   EXPECT_THROW(server2->bind(address.getPort()), std::exception);
 }
 
-} // namespace
+} // namespace folly
index 407552ac4e1b2e1d9165e0b390331192c8aadd09..132875a10df5cea31e922b87130599bf0f01b04f 100644 (file)
@@ -220,5 +220,5 @@ class TestAcceptCallback : public AsyncServerSocket::AcceptCallback {
 
   std::deque<EventInfo> events_;
 };
-}
-}
+} // namespace test
+} // namespace folly
index ddcd4480d9c1978d82e26e998c9d3d5670ec0d78..4f43ffa03815a7d8efebaade6212e0a0bec85f0c 100644 (file)
@@ -46,4 +46,4 @@ TEST(AsyncTransportTest, getSocketFromWrappedTransport) {
   ASSERT_EQ(transportAddr, sock);
 }
 
-} // namespace
+} // namespace folly
index 8690b1839e92dc5cb0f7720915b0e6722d882da2..feaf0ee3cc76fe06eaf4e47a88d139b81de3521a 100644 (file)
@@ -96,4 +96,5 @@ class MockWriteCallback: public AsyncTransportWrapper::WriteCallback {
                  void(size_t, const AsyncSocketException&));
 };
 
-}}
+} // namespace test
+} // namespace folly
index 7ecf0553b79187ae449f60f80a446707c33bb1a3..955a1fc8669589fa83be4cadbba7a27c18f6e4df 100644 (file)
@@ -48,4 +48,4 @@ TEST_F(SSLContextTest, TestSetCipherList) {
   ctx.setCipherList(ciphers);
   verifySSLCipherList(ciphers);
 }
-}
+} // namespace folly
index 471f93135cd8846ae836c81dcf6c45be1ce97a31..f3d7c3ed3276c0417d127e1eb83b210853772751 100644 (file)
@@ -37,4 +37,4 @@ TEST_F(SSLOptionsTest, TestSetCommonCipherList) {
   }
   ASSERT_EQ(nullptr, SSL_get_cipher_list(ssl.get(), i));
 }
-}
+} // namespace folly
index d874509b8cd65d49ed21bea244eb5f2a2c0f87d1..ad30c80e2b2b8b81168333bedd88f4f6ab0be8e0 100644 (file)
@@ -188,4 +188,4 @@ TEST_F(SSLSessionTest, GetSessionID) {
   auto sessID = sess->getSessionID();
   ASSERT_GE(sessID.length(), 0);
 }
-}
+} // namespace folly
index e7aefb488fc7a506493f03607d5aa6f29623f9c7..a331449f999b3ca55185689859653b7d64e62922 100644 (file)
@@ -37,4 +37,4 @@ ScopedBoundPort::~ScopedBoundPort() {
 SocketAddress ScopedBoundPort::getAddress() const {
   return sock_->getAddress();
 }
-}
+} // namespace folly
index bf6aadf925cde6a4b3460f36219dff7c21e59919..3c508befaa3e89fc7427b3af7ac2807b3eff1819 100644 (file)
@@ -57,4 +57,4 @@ class ScopedBoundPort {
   std::unique_ptr<ScopedEventBaseThread> ebth_;
   std::shared_ptr<AsyncServerSocket> sock_;
 };
-}
+} // namespace folly
index 0905fdd6cfcabfaa51e32e5de852a3b5c38678a4..638fec39fb319da98a5322cd37c841501b672738 100644 (file)
@@ -66,4 +66,4 @@ void SocketPair::closeFD1() {
   }
 }
 
-}
+} // namespace folly
index 2f5489ca434bf58d6d48007221fde64042b82d12..ec69ce79c9e8d67d94cc04e7e1b50c705aa08124 100644 (file)
@@ -51,4 +51,4 @@ class SocketPair {
   int fds_[2];
 };
 
-}
+} // namespace folly
index c75afec655bb99e2d71a17dd54bd9ad3f8d19325..bb2d4f8239e2e53b4267b4bde2cd48918d12be3c 100644 (file)
@@ -83,4 +83,4 @@ void TestSSLServer::init(bool enableTFO) {
   });
   LOG(INFO) << "Accepting connections on " << address_;
 }
-}
+} // namespace folly
index e03e45506561aa7b0c9d4fd49527a9ecd4688a20..98a7767e03cbf948f9c00abf9a61880bd8081fd6 100644 (file)
@@ -132,4 +132,4 @@ class TestSSLServer {
  private:
   void init(bool);
 };
-}
+} // namespace folly
index 94c703745989a0f7d5197388c6623165c406da14..7768559cb842f8929f2fd73c5fef512a03add4a5 100644 (file)
@@ -280,4 +280,4 @@ bool checkTimeout(
   return true;
 }
 
-}
+} // namespace folly
index 7b41d1e4d66f20367b1e66957a22eb0bc7dcf2f5..311123b7033d7a02b11673a8e4c554582d7e0eb7 100644 (file)
@@ -83,4 +83,4 @@ bool checkTimeout(
     std::chrono::nanoseconds expected,
     bool allowSmaller,
     std::chrono::nanoseconds tolerance = std::chrono::milliseconds(5));
-}
+} // namespace folly
index 2945f1fbca896b0d1589d23c75afe5be22427c52..7092813e6944b3b6ddb6fa06542912e11cf1f7a6 100644 (file)
@@ -36,8 +36,8 @@ namespace chrono {
 static inline void PrintTo(nanoseconds ns, ::std::ostream* os) {
   *os << ns.count() << "ns";
 }
-}
-}
+} // namespace chrono
+} // namespace std
 
 #ifdef __linux__
 void runThread(nanoseconds duration, nanoseconds* timeWaiting) {
index cc8e441967af028ee45a2b67e5e08c52a36ea9dd..4cf568a563d552382a05c56bea357c842dbd48ac 100644 (file)
@@ -105,4 +105,4 @@ class UndelayedDestruction : public TDD {
   UndelayedDestruction& operator=(UndelayedDestruction const &) = delete;
 };
 
-}
+} // namespace folly
index 10cf02ccd34fe5cf5613fd140b745bb0329fb933..6925cda9964c7b289351aed092a97678b4b92a53 100644 (file)
@@ -82,4 +82,5 @@ TEST(WriteChainAsyncTransportWrapperTest, TestSimpleBuf) {
   transport.write(nullptr, buf->data(), buf->length());
 }
 
-}}
+} // namespace test
+} // namespace folly
index 0ae9fd9533e6e4f165688f854f7bcab959c4d144..3f6a7c70446f026394040ff0791ba08adf5ae13f 100644 (file)
@@ -109,4 +109,4 @@ TEST(WriteFlagsTest, compoundAssignmentIntersectionOperator) {
   ASSERT_EQ(flags, WriteFlags::NONE);
 }
 
-} // namespace
+} // namespace folly
index 319b5286bb6c78d3891cce1625ddbd957d20e736..ae6a40d695df5766402da0ca3750b2789db19a3e 100644 (file)
@@ -57,7 +57,7 @@ void checkConsistency(const IOBufQueue& queue) {
   }
 }
 
-}
+} // namespace
 
 TEST(IOBufQueue, Simple) {
   IOBufQueue queue(clOptions);
index 03a2b52f38e9f78dc68879050f4f37481b838505..029278e245f5a16b506a21a8e93e9d64a8a4ff00 100644 (file)
@@ -597,7 +597,7 @@ dynamic parseValue(Input& in) {
          in.error("expected json value");
 }
 
-}
+} // namespace
 
 //////////////////////////////////////////////////////////////////////
 
@@ -813,7 +813,7 @@ std::string stripComments(StringPiece jsonC) {
   return result;
 }
 
-}
+} // namespace json
 
 //////////////////////////////////////////////////////////////////////
 
@@ -868,4 +868,4 @@ void PrintTo(const dynamic& dyn, std::ostream* os) {
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index 788587a8aa6defbabf2b8ef69b91f07f5ceee278..a5215535176e2965f6934c7d86bb4a4743c795ed 100644 (file)
@@ -53,102 +53,102 @@ namespace folly {
 
 namespace json {
 
-  struct serialization_opts {
-    explicit serialization_opts()
-        : allow_non_string_keys(false),
-          javascript_safe(false),
-          pretty_formatting(false),
-          encode_non_ascii(false),
-          validate_utf8(false),
-          allow_trailing_comma(false),
-          sort_keys(false),
-          skip_invalid_utf8(false),
-          allow_nan_inf(false),
-          double_mode(double_conversion::DoubleToStringConverter::SHORTEST),
-          double_num_digits(0), // ignored when mode is SHORTEST
-          double_fallback(false),
-          parse_numbers_as_strings(false),
-          recursion_limit(100) {}
-
-    // If true, keys in an object can be non-strings.  (In strict
-    // JSON, object keys must be strings.)  This is used by dynamic's
-    // operator<<.
-    bool allow_non_string_keys;
-
-    /*
-     * If true, refuse to serialize 64-bit numbers that cannot be
-     * precisely represented by fit a double---instead, throws an
-     * exception if the document contains this.
-     */
-    bool javascript_safe;
-
-    // If true, the serialized json will contain space and newlines to
-    // try to be minimally "pretty".
-    bool pretty_formatting;
-
-    // If true, non-ASCII utf8 characters would be encoded as \uXXXX.
-    bool encode_non_ascii;
-
-    // Check that strings are valid utf8
-    bool validate_utf8;
-
-    // Allow trailing comma in lists of values / items
-    bool allow_trailing_comma;
-
-    // Sort keys of all objects before printing out (potentially slow)
-    // using dynamic::operator<.
-    // Has no effect if sort_keys_by is set.
-    bool sort_keys;
-
-    // Sort keys of all objects before printing out (potentially slow)
-    // using the provided less functor.
-    Function<bool(dynamic const&, dynamic const&) const> sort_keys_by;
-
-    // Replace invalid utf8 characters with U+FFFD and continue
-    bool skip_invalid_utf8;
-
-    // true to allow NaN or INF values
-    bool allow_nan_inf;
-
-    // Options for how to print floating point values.  See Conv.h
-    // toAppend implementation for floating point for more info
-    double_conversion::DoubleToStringConverter::DtoaMode double_mode;
-    unsigned int double_num_digits;
-
-    // Fallback to double when a value that looks like integer is too big to
-    // fit in an int64_t. Can result in loss a of precision.
-    bool double_fallback;
-
-    // Do not parse numbers. Instead, store them as strings and leave the
-    // conversion up to the user.
-    bool parse_numbers_as_strings;
-
-    // Recursion limit when parsing.
-    unsigned int recursion_limit;
-  };
+struct serialization_opts {
+  explicit serialization_opts()
+      : allow_non_string_keys(false),
+        javascript_safe(false),
+        pretty_formatting(false),
+        encode_non_ascii(false),
+        validate_utf8(false),
+        allow_trailing_comma(false),
+        sort_keys(false),
+        skip_invalid_utf8(false),
+        allow_nan_inf(false),
+        double_mode(double_conversion::DoubleToStringConverter::SHORTEST),
+        double_num_digits(0), // ignored when mode is SHORTEST
+        double_fallback(false),
+        parse_numbers_as_strings(false),
+        recursion_limit(100) {}
+
+  // If true, keys in an object can be non-strings.  (In strict
+  // JSON, object keys must be strings.)  This is used by dynamic's
+  // operator<<.
+  bool allow_non_string_keys;
 
   /*
-   * Main JSON serialization routine taking folly::dynamic parameters.
-   * For the most common use cases there are simpler functions in the
-   * main folly namespace below.
+   * If true, refuse to serialize 64-bit numbers that cannot be
+   * precisely represented by fit a double---instead, throws an
+   * exception if the document contains this.
    */
-  std::string serialize(dynamic const&, serialization_opts const&);
+  bool javascript_safe;
 
-  /*
-   * Escape a string so that it is legal to print it in JSON text and
-   * append the result to out.
-   */
+  // If true, the serialized json will contain space and newlines to
+  // try to be minimally "pretty".
+  bool pretty_formatting;
 
-  void escapeString(
-      StringPiece input,
-      std::string& out,
-      const serialization_opts& opts);
+  // If true, non-ASCII utf8 characters would be encoded as \uXXXX.
+  bool encode_non_ascii;
 
-  /*
-   * Strip all C99-like comments (i.e. // and / * ... * /)
-   */
-  std::string stripComments(StringPiece jsonC);
-}
+  // Check that strings are valid utf8
+  bool validate_utf8;
+
+  // Allow trailing comma in lists of values / items
+  bool allow_trailing_comma;
+
+  // Sort keys of all objects before printing out (potentially slow)
+  // using dynamic::operator<.
+  // Has no effect if sort_keys_by is set.
+  bool sort_keys;
+
+  // Sort keys of all objects before printing out (potentially slow)
+  // using the provided less functor.
+  Function<bool(dynamic const&, dynamic const&) const> sort_keys_by;
+
+  // Replace invalid utf8 characters with U+FFFD and continue
+  bool skip_invalid_utf8;
+
+  // true to allow NaN or INF values
+  bool allow_nan_inf;
+
+  // Options for how to print floating point values.  See Conv.h
+  // toAppend implementation for floating point for more info
+  double_conversion::DoubleToStringConverter::DtoaMode double_mode;
+  unsigned int double_num_digits;
+
+  // Fallback to double when a value that looks like integer is too big to
+  // fit in an int64_t. Can result in loss a of precision.
+  bool double_fallback;
+
+  // Do not parse numbers. Instead, store them as strings and leave the
+  // conversion up to the user.
+  bool parse_numbers_as_strings;
+
+  // Recursion limit when parsing.
+  unsigned int recursion_limit;
+};
+
+/*
+ * Main JSON serialization routine taking folly::dynamic parameters.
+ * For the most common use cases there are simpler functions in the
+ * main folly namespace below.
+ */
+std::string serialize(dynamic const&, serialization_opts const&);
+
+/*
+ * Escape a string so that it is legal to print it in JSON text and
+ * append the result to out.
+ */
+
+void escapeString(
+    StringPiece input,
+    std::string& out,
+    const serialization_opts& opts);
+
+/*
+ * Strip all C99-like comments (i.e. // and / * ... * /)
+ */
+std::string stripComments(StringPiece jsonC);
+} // namespace json
 
 //////////////////////////////////////////////////////////////////////
 
@@ -177,4 +177,4 @@ std::string toPrettyJson(dynamic const&);
 void PrintTo(const dynamic&, std::ostream*);
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index 2ed0f05137460d4b101f568d96ca5206f2cb99e2..946b9399ef0e1b6fc85949010376bf3c7027cff3 100644 (file)
@@ -42,4 +42,4 @@ inline void asm_volatile_pause() {
   asm volatile("or 27,27,27");
 #endif
 }
-}
+} // namespace folly
index 64005e3c45c26d2a5e2f846e99145ba9d5735adf..4fd02c5cecd3884ba0cbdb241d38dc7f392c46c2 100644 (file)
@@ -48,4 +48,4 @@ constexpr size_t constexpr_strlen(const char* s) {
   return std::strlen(s);
 #endif
 }
-}
+} // namespace folly
index fb836d56f3cd44fe3e20c71f0ec1a91432d0404e..1fb80e9fa1f4cb296dd62cddef45f5ac0c0f3b24 100644 (file)
@@ -63,4 +63,4 @@ folly_event_set(event* e, int fd, short s, EventSetCallback f, void* arg) {
   auto lfd = getLibeventFd(fd);
   event_set(e, lfd, s, f, arg);
 }
-}
+} // namespace folly
index 36c8ebd8f682c2fa27fd2e35ccdf6c3f32a87a14..ee0659912765f8f5711912b44b243ee9d1ff47d6 100755 (executable)
@@ -49,8 +49,8 @@ char* internal_dirname(char* path) {
   }
   return path;
 }
-}
-}
+} // namespace portability
+} // namespace folly
 
 #ifdef _WIN32
 extern "C" char* dirname(char* path) {
index 9085032858ee9ad3b8aa4e4e085dcbe7a9ca28fc..148966e676d28b9cf87d186db6a2ff12de13cc64 100755 (executable)
@@ -19,8 +19,8 @@
 namespace folly {
 namespace portability {
 char* internal_dirname(char* path);
-}
-}
+} // namespace portability
+} // namespace folly
 
 #ifndef _WIN32
 #include <libgen.h>
index b19a00ab50ed455fd51de5b17d721c364b516651..8d5037dd8895e8185f64969725ea0430b829482b 100644 (file)
@@ -68,4 +68,4 @@ inline long double nextafter(long double x, long double y) {
 #endif // __GNUC__
 
 #endif // __ANDROID__
-}
+} // namespace folly
index ca138c03cfc72911dcf5ea2da80aae63d49120b7..7ad9a6c42f1221d311e0c7e893c9d883ef8feabd 100644 (file)
@@ -62,5 +62,5 @@ void aligned_free(void* aligned_ptr) {
   free(aligned_ptr);
 }
 #endif
-}
-}
+} // namespace detail
+} // namespace folly
index 7e58dc4dd2848243bc85a4c08e912893ea87bb67..d932a5dc13422224ca1b38b98418b8bd2632e3db 100644 (file)
@@ -22,5 +22,5 @@ namespace folly {
 namespace detail {
 void* aligned_malloc(size_t size, size_t align);
 void aligned_free(void* aligned_ptr);
-}
-}
+} // namespace detail
+} // namespace folly
index 7a888e2c51a7c480ad8b40e6587df2115ebacd15..845c441013a07f93b5525707d0ef38687a906313 100644 (file)
@@ -401,6 +401,6 @@ const ASN1_TIME* X509_REVOKED_get0_revocationDate(const X509_REVOKED* r) {
 }
 
 #endif // !FOLLY_OPENSSL_IS_110
-}
-}
-}
+} // namespace ssl
+} // namespace portability
+} // namespace folly
index 353ace8e2ded534c1dd4c289a4649160e104e69f..eceb91d6c4f02c61a0700522d39e0b8e2f1bae85 100644 (file)
@@ -187,9 +187,9 @@ const ASN1_TIME* X509_REVOKED_get0_revocationDate(const X509_REVOKED* r);
 // indicates it isn't supported.
 #define OPENSSL_NO_SSL2
 #endif
-}
-}
-}
+} // namespace ssl
+} // namespace portability
+} // namespace folly
 
 FOLLY_PUSH_WARNING
 #if __CLANG_PREREQ(3, 0)
index 99f1424dd7dc26b2569262edccb2429e9db91e27..314029eaee6c4ed7ca987f55d9587974231bd02e 100755 (executable)
@@ -215,9 +215,9 @@ int setsockopt(
     const char* optval,
     socklen_t optlen);
 #endif
-}
-}
-}
+} // namespace sockets
+} // namespace portability
+} // namespace folly
 
 #ifdef _WIN32
 // Add our helpers to the overload set.
index 1bc2a7ab2d955eb48c5c9b069a72bf8c7743ffa1..ba1774da12be65054b4e36dd66da03aaa3d4f8c7 100644 (file)
@@ -60,5 +60,5 @@ int sysMembarrier() {
   return -1;
 #endif
 }
-}
-}
+} // namespace detail
+} // namespace folly
index 8bb3103aa04faabf7e2a133746d79255bcd0a881..341e6922223efc68f51d2a2d19b15e07d7aa92e5 100644 (file)
@@ -21,5 +21,5 @@ namespace detail {
 
 int sysMembarrier();
 bool sysMembarrierAvailable();
-}
-}
+} // namespace detail
+} // namespace folly
index 2fa356aa93a01b25fb10f6e462cadc10e2c497a7..eead4b03e36906929c0da4ee52e85f672a230971 100644 (file)
@@ -38,4 +38,4 @@ constexpr size_t kIovMax = IOV_MAX;
 #else
 constexpr size_t kIovMax = UIO_MAXIOV;
 #endif
-}
+} // namespace folly
index 2891d797a9000d3dc6c635bdb00cd1921a57bfa2..b2bc97362062c6a782ead92d3ff5c3d64e3e864b 100644 (file)
@@ -21,7 +21,7 @@
 namespace {
 
 class ConstexprTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(ConstexprTest, constexpr_strlen_cstr) {
   constexpr auto v = "hello";
index 59dd3e54d8e93cce15f078bb838332ebfd872875..d8911a077b2dd9fb561ceb52ca8c9f1c75ad44c4 100644 (file)
@@ -378,7 +378,7 @@ T* pointerFlagClear(T* p) {
 inline void* shiftPointer(void* p, size_t sizeBytes) {
   return static_cast<char*>(p) + sizeBytes;
 }
-}
+} // namespace detail
 
 //////////////////////////////////////////////////////////////////////
 FOLLY_PACK_PUSH
index e05cabd0c69bf6e93673832c60f376b064a62847..d011a83d401276e16741fe2d4209183ad3d51908 100644 (file)
@@ -76,112 +76,110 @@ namespace folly {
 
 namespace detail {
 
-  // This wrapper goes around a GrowthPolicy and provides iterator
-  // preservation semantics, but only if the growth policy is not the
-  // default (i.e. nothing).
-  template <class Policy>
-  struct growth_policy_wrapper : private Policy {
-    template <class Container, class Iterator>
-    Iterator increase_capacity(Container& c, Iterator desired_insertion)
-    {
-      typedef typename Container::difference_type diff_t;
-      diff_t d = desired_insertion - c.begin();
-      Policy::increase_capacity(c);
-      return c.begin() + d;
-    }
-  };
-  template <>
-  struct growth_policy_wrapper<void> {
-    template <class Container, class Iterator>
-    Iterator increase_capacity(Container&, Iterator it) {
-      return it;
-    }
-  };
-
-  /*
-   * This helper returns the distance between two iterators if it is
-   * possible to figure it out without messing up the range
-   * (i.e. unless they are InputIterators).  Otherwise this returns
-   * -1.
-   */
-  template <class Iterator>
-  int distance_if_multipass(Iterator first, Iterator last) {
-    typedef typename std::iterator_traits<Iterator>::iterator_category categ;
-    if (std::is_same<categ, std::input_iterator_tag>::value) {
-      return -1;
-    }
-    return std::distance(first, last);
+// This wrapper goes around a GrowthPolicy and provides iterator
+// preservation semantics, but only if the growth policy is not the
+// default (i.e. nothing).
+template <class Policy>
+struct growth_policy_wrapper : private Policy {
+  template <class Container, class Iterator>
+  Iterator increase_capacity(Container& c, Iterator desired_insertion) {
+    typedef typename Container::difference_type diff_t;
+    diff_t d = desired_insertion - c.begin();
+    Policy::increase_capacity(c);
+    return c.begin() + d;
+  }
+};
+template <>
+struct growth_policy_wrapper<void> {
+  template <class Container, class Iterator>
+  Iterator increase_capacity(Container&, Iterator it) {
+    return it;
   }
+};
 
-  template <class OurContainer, class Vector, class GrowthPolicy>
-  typename OurContainer::iterator
-  insert_with_hint(OurContainer& sorted,
-                   Vector& cont,
-                   typename OurContainer::iterator hint,
-                   typename OurContainer::value_type&& value,
-                   GrowthPolicy& po)
-  {
-    const typename OurContainer::value_compare& cmp(sorted.value_comp());
-    if (hint == cont.end() || cmp(value, *hint)) {
-      if (hint == cont.begin() || cmp(*(hint - 1), value)) {
-        hint = po.increase_capacity(cont, hint);
-        return cont.insert(hint, std::move(value));
-      } else {
-        return sorted.insert(std::move(value)).first;
-      }
-    }
+/*
+ * This helper returns the distance between two iterators if it is
+ * possible to figure it out without messing up the range
+ * (i.e. unless they are InputIterators).  Otherwise this returns
+ * -1.
+ */
+template <class Iterator>
+int distance_if_multipass(Iterator first, Iterator last) {
+  typedef typename std::iterator_traits<Iterator>::iterator_category categ;
+  if (std::is_same<categ, std::input_iterator_tag>::value) {
+    return -1;
+  }
+  return std::distance(first, last);
+}
 
-    if (cmp(*hint, value)) {
-      if (hint + 1 == cont.end() || cmp(value, *(hint + 1))) {
-        hint = po.increase_capacity(cont, hint + 1);
-        return cont.insert(hint, std::move(value));
-      } else {
-        return sorted.insert(std::move(value)).first;
-      }
+template <class OurContainer, class Vector, class GrowthPolicy>
+typename OurContainer::iterator insert_with_hint(
+    OurContainer& sorted,
+    Vector& cont,
+    typename OurContainer::iterator hint,
+    typename OurContainer::value_type&& value,
+    GrowthPolicy& po) {
+  const typename OurContainer::value_compare& cmp(sorted.value_comp());
+  if (hint == cont.end() || cmp(value, *hint)) {
+    if (hint == cont.begin() || cmp(*(hint - 1), value)) {
+      hint = po.increase_capacity(cont, hint);
+      return cont.insert(hint, std::move(value));
+    } else {
+      return sorted.insert(std::move(value)).first;
     }
-
-    // Value and *hint did not compare, so they are equal keys.
-    return hint;
   }
 
-  template <class OurContainer, class Vector, class InputIterator>
-  void bulk_insert(
-      OurContainer& sorted,
-      Vector& cont,
-      InputIterator first,
-      InputIterator last) {
-    // prevent deref of middle where middle == cont.end()
-    if (first == last) {
-      return;
+  if (cmp(*hint, value)) {
+    if (hint + 1 == cont.end() || cmp(value, *(hint + 1))) {
+      hint = po.increase_capacity(cont, hint + 1);
+      return cont.insert(hint, std::move(value));
+    } else {
+      return sorted.insert(std::move(value)).first;
     }
+  }
 
-    auto const& cmp(sorted.value_comp());
-
-    int const d = distance_if_multipass(first, last);
-    if (d != -1) {
-      cont.reserve(cont.size() + d);
-    }
-    auto const prev_size = cont.size();
+  // Value and *hint did not compare, so they are equal keys.
+  return hint;
+}
 
-    std::copy(first, last, std::back_inserter(cont));
-    auto const middle = cont.begin() + prev_size;
-    if (!std::is_sorted(middle, cont.end(), cmp)) {
-      std::sort(middle, cont.end(), cmp);
-    }
-    if (middle != cont.begin() && !cmp(*(middle - 1), *middle)) {
-      std::inplace_merge(cont.begin(), middle, cont.end(), cmp);
-      cont.erase(
-          std::unique(
-              cont.begin(),
-              cont.end(),
-              [&](typename OurContainer::value_type const& a,
-                  typename OurContainer::value_type const& b) {
-                return !cmp(a, b) && !cmp(b, a);
-              }),
-          cont.end());
-    }
+template <class OurContainer, class Vector, class InputIterator>
+void bulk_insert(
+    OurContainer& sorted,
+    Vector& cont,
+    InputIterator first,
+    InputIterator last) {
+  // prevent deref of middle where middle == cont.end()
+  if (first == last) {
+    return;
+  }
+
+  auto const& cmp(sorted.value_comp());
+
+  int const d = distance_if_multipass(first, last);
+  if (d != -1) {
+    cont.reserve(cont.size() + d);
+  }
+  auto const prev_size = cont.size();
+
+  std::copy(first, last, std::back_inserter(cont));
+  auto const middle = cont.begin() + prev_size;
+  if (!std::is_sorted(middle, cont.end(), cmp)) {
+    std::sort(middle, cont.end(), cmp);
+  }
+  if (middle != cont.begin() && !cmp(*(middle - 1), *middle)) {
+    std::inplace_merge(cont.begin(), middle, cont.end(), cmp);
+    cont.erase(
+        std::unique(
+            cont.begin(),
+            cont.end(),
+            [&](typename OurContainer::value_type const& a,
+                typename OurContainer::value_type const& b) {
+              return !cmp(a, b) && !cmp(b, a);
+            }),
+        cont.end());
   }
 }
+} // namespace detail
 
 //////////////////////////////////////////////////////////////////////
 
@@ -732,4 +730,4 @@ inline void swap(sorted_vector_map<K,V,C,A,G>& a,
 
 //////////////////////////////////////////////////////////////////////
 
-}
+} // namespace folly
index 91c41b063e83f361725a08d1eca26289fe159a20..0170756bac3186cfe12f8cdd5a37e94ce34436a8 100644 (file)
@@ -49,7 +49,7 @@ void cleanupOpenSSLLocked() {
   OPENSSL_cleanup();
   initialized_ = false;
 }
-}
+} // namespace
 
 void init() {
   std::lock_guard<std::mutex> g(initMutex());
index 373fde01b37c6e96beb88120cabd7e3ec9b5f5ed..9de269f5c6f2b81bf675a44bb561f969ca9511ab 100644 (file)
@@ -79,5 +79,5 @@ class OpenSSLCertUtils {
  private:
   static std::string getDateTimeStr(const ASN1_TIME* time);
 };
-}
-}
+} // namespace ssl
+} // namespace folly
index cfe886acae72388cb34b7ba94805fd355f17c9ed..7062a16ba07586d86d550e89137870755d41fafb 100644 (file)
@@ -31,5 +31,5 @@ namespace ssl {
 [[noreturn]] void OpenSSLHash::check_libssl_result_throw() {
   throw std::runtime_error("openssl crypto function failed");
 }
-}
-}
+} // namespace ssl
+} // namespace folly
index b783cdc1f45e8d95ad477a2ab31ad99a72888140..0804c221858bf6442ee210a6c7d4b0ca7f995aa5 100644 (file)
@@ -181,5 +181,5 @@ class OpenSSLHash {
   }
   [[noreturn]] static void check_libssl_result_throw();
 };
-}
-}
+} // namespace ssl
+} // namespace folly
index 683add6a6e9b9a3e6ad9919f63f474b339516e06..a4fe7a90b6a73a0831f6141b67de43739ed3c464 100644 (file)
@@ -106,5 +106,5 @@ using BIGNUMUniquePtr = std::unique_ptr<BIGNUM, BIGNUMDeleter>;
 // SSL and SSL_CTX
 using SSLDeleter = folly::static_function_deleter<SSL, &SSL_free>;
 using SSLUniquePtr = std::unique_ptr<SSL, SSLDeleter>;
-}
-}
+} // namespace ssl
+} // namespace folly
index 5a7b9c5c85791a68b0345f2149c0802e347ee0ba..bc6d527842d3cd7323b6a9b94640184d29b0b58e 100644 (file)
@@ -26,6 +26,6 @@ bool isSSLLockDisabled(int lockId);
 void setLockTypes(std::map<int, LockType> inLockTypes);
 void installThreadingLocks();
 void cleanupThreadingLocks();
-}
-}
-}
+} // namespace detail
+} // namespace ssl
+} // namespace folly
index c2722caa5ec1d08f29cef3b133c65017082883c4..a434c68fc06bd86fcfea983d8be93373aeeba918 100644 (file)
@@ -26,7 +26,7 @@ using namespace folly::ssl;
 namespace {
 
 class OpenSSLHashTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(OpenSSLHashTest, sha256) {
   IOBuf buf;
index 7eaf46e8f03f3c229cc175bbff86d66ee06fb2ce..890f1db2cd562c36be73a3b2c0128e7ff1b594e9 100644 (file)
@@ -19,4 +19,4 @@
 
 namespace folly {
 template class BucketedTimeSeries<int64_t>;
-}
+} // namespace folly
index 404a4d1e58247aada092e038435b6522df049f2b..43a6ff7d8c2a88fe00948d4d7d539395bf06e09f 100644 (file)
@@ -19,4 +19,4 @@
 
 namespace folly {
 template class MultiLevelTimeSeries<int64_t>;
-}
+} // namespace folly
index 22c972fb50ab72b23965f58a5249fac6937c13db..7092aba747c6cf946382f9f773f004e5a1853742 100644 (file)
@@ -19,4 +19,4 @@
 
 namespace folly {
 template class TimeseriesHistogram<int64_t>;
-}
+} // namespace folly
index e30ec6c662ab484b2bdfe81dd842b959997bd3ca..b02c4ce20bf54dea3cb44d0e3a722c9b0269cc6f 100644 (file)
@@ -49,7 +49,7 @@ std::ostream& operator<<(std::ostream& os, TimePoint tp) {
   os << tp.time_since_epoch().count();
   return os;
 }
-}
+} // namespace std
 
 namespace {
 TimePoint mkTimePoint(int value) {
@@ -80,7 +80,7 @@ vector<TestData> testData = {
     // 1 second x 1 buckets
     {1, 1, {0}},
 };
-}
+} // namespace
 
 TEST(BucketedTimeSeries, getBucketInfo) {
   for (const auto& data : testData) {
@@ -898,7 +898,7 @@ enum Levels {
 };
 
 const seconds kMinuteHourDurations[] = {seconds(60), seconds(3600), seconds(0)};
-};
+} // namespace IntMHTS
 
 TEST(MinuteHourTimeSeries, Basic) {
   folly::MultiLevelTimeSeries<int> mhts(
index 6786667b06fa01493a498e4a7a22d10701421b46..809a6f9005879a36f7788987bf441a5bac8c68d5 100644 (file)
@@ -41,7 +41,7 @@ const seconds kDurations[] = {
     seconds(3600),
     seconds(0),
 };
-};
+} // namespace IntMTMHTS
 
 namespace IntMHTS {
 enum Levels {
@@ -56,7 +56,7 @@ const seconds kDurations[] = {
     seconds(3600),
     seconds(0),
 };
-};
+} // namespace IntMHTS
 
 typedef std::mt19937 RandomInt32;
 
@@ -64,7 +64,7 @@ using StatsClock = folly::LegacyStatsClock<std::chrono::seconds>;
 StatsClock::time_point mkTimePoint(int value) {
   return StatsClock::time_point(StatsClock::duration(value));
 }
-}
+} // namespace
 
 TEST(TimeseriesHistogram, Percentile) {
   RandomInt32 random(5);
index 994af110ad7f43e47d73c82d5df6a28e3bfd7dab..5bac22a2e373a2e9e462f0267d81cf4ed72a9e7f 100644 (file)
@@ -321,4 +321,4 @@ using coarse_stop_watch = custom_stop_watch<monotonic_coarse_clock, Duration>;
  */
 template <typename Duration = monotonic_clock::duration>
 using stop_watch = custom_stop_watch<monotonic_clock, Duration>;
-}
+} // namespace folly
index 4dd06941a25bb3f584f644f988738d51e9588f3f..da938beb069a07864dd28f86ab620ae3cd5eeec4 100644 (file)
@@ -81,4 +81,4 @@ call_once_impl_no_inline(once_flag& flag, Callable&& f, Args&&... args) {
 
   flag.called_.store(true, std::memory_order_release);
 }
-}
+} // namespace folly
index cefe2ddb290e0fd0577077e0266d7c3798b1ed62..e40db8c4ab5f7e17016c471b5b3b500c15ba567e 100644 (file)
@@ -67,8 +67,8 @@ constexpr detail::ShellCmdFormat operator"" _shellify(
     std::size_t length) {
   return {folly::StringPiece(name, length)};
 }
-} // inline namespace shell_literals
-} // inline namespace literals
+} // namespace shell_literals
+} // namespace literals
 
 /**
   * Create argument array for `Subprocess()` for a process running in a
index 18b82cd7d7fec66afcd8751877eca8b5dd39fc88..838a4ec8099d52d16e7c41aa28c2c4ba272f5ec1 100644 (file)
@@ -88,4 +88,4 @@ inline uint64_t getOSThreadID() {
   return uint64_t(syscall(FOLLY_SYS_gettid));
 #endif
 }
-}
+} // namespace folly
index 49793a910b47a5e937fbef384b13cb3b9fa53009..7b8efa3f65ec1b45e2d8be46e4f80a13952ed8c5 100644 (file)
@@ -148,4 +148,4 @@ bool setThreadName(pthread_t pid, StringPiece name) {
 bool setThreadName(StringPiece name) {
   return setThreadName(std::this_thread::get_id(), name);
 }
-}
+} // namespace folly
index ba7bde25953925e451fdc447af422643365edacd..29456a5eba61db8298402e73744e48886ccd11b0 100644 (file)
@@ -63,4 +63,4 @@ bool setThreadName(pthread_t pid, StringPiece name);
  * Equivalent to setThreadName(std::this_thread::get_id(), name);
  */
 bool setThreadName(StringPiece name);
-}
+} // namespace folly
index be333d682bc462a4a3af0b3568dfd6a386ceaff9..93de0a026de836b5a33c4b1f8020ebb727b99939 100644 (file)
@@ -20,4 +20,5 @@ namespace folly { namespace detail {
 
 FOLLY_VERSION_CHECK(folly, FOLLY_VERSION)
 
-}}  // namespaces
+} // namespace detail
+} // namespace folly
index 5f577afa746538ca993c16e82eb545269d91c248..af3e0443105885bcc08e1c60e5dda70097958ff4 100644 (file)
@@ -93,7 +93,7 @@ struct MyObjectDirectory {
   std::shared_ptr<MyMap> prev_;
 };
 
-}
+} // namespace
 
 //////////////////////////////////////////////////////////////////////
 
index effe16a0131dc2b83194b9213019ac6efd3d01c6..9eb4d24f19f9dac4e99804cb201136016c6bbcf7 100644 (file)
@@ -53,7 +53,8 @@ TEST(AtomicBitSet, Simple) {
   }
 }
 
-}}  // namespaces
+} // namespace test
+} // namespace folly
 
 int main(int argc, char *argv[]) {
   testing::InitGoogleTest(&argc, argv);
index 7326d0d335abe57c7132dd514792441f3311ef6e..67633201817fdeea2afac51c5f06268d7f10d931 100644 (file)
@@ -468,7 +468,7 @@ void runThreads(void *(*mainFunc)(void*)) {
   runThreads(mainFunc, FLAGS_numThreads, nullptr);
 }
 
-}
+} // namespace
 
 TEST(Ahm, collision_test) {
   const int numInserts = 1000000 / 4;
@@ -559,7 +559,7 @@ void* raceInsertRandomThread(void*) {
   return nullptr;
 }
 
-}
+} // namespace
 
 // Test for race conditions when inserting and iterating at the same time and
 // creating multiple submaps.
@@ -638,7 +638,7 @@ void* testEraseEraseThread(void*) {
   return nullptr;
 }
 
-}
+} // namespace
 
 // Here we have a single thread inserting some values, and several threads
 // racing to delete the values in the order they were inserted.
@@ -842,7 +842,7 @@ void loadGlobalQPAhm() {
   EXPECT_EQ(globalQPAHM->size(), FLAGS_numBMElements);
 }
 
-}
+} // namespace
 
 BENCHMARK(st_aha_find, iters) {
   CHECK_LE(iters, FLAGS_numBMElements);
index e38b60148139c9736e5b5dacf4ee96351e992674..9d1287db120c1004f1110e6347aad6064b7cae08 100644 (file)
@@ -109,7 +109,7 @@ using UIM =
 namespace {
 template <typename T>
 struct AtomicUnorderedInsertMapTest : public ::testing::Test {};
-}
+} // namespace
 
 // uint16_t doesn't make sense for most platforms, but we might as well
 // test it
index a9a4fee721c3b1d6f9c2f4468e3ec924087dcecf..b876be2d3ade02801f2594232e4505d5cb8e3663 100644 (file)
@@ -155,7 +155,7 @@ class NonTrivialLong {
   long value_;
   long otherStuff_[3];
 };
-}
+} // namespace
 
 BENCHMARK(optimizerCanDiscardNonTrivial, n) {
   NonTrivialLong x(0);
index 23083364b11a685628ff473e035c29330b5cf085..01dac7471045a4c4438b4a4c8f0484d959ac54a0 100644 (file)
@@ -150,7 +150,7 @@ void runRealFFSTest(int iters) {
   }
 }
 
-}
+} // namespace
 
 TEST(BitIterator, SimpleFindFirstSet) {
   runSimpleFFSTest(1);
index 3b4a431e968a8f77875effeb808c2f79d2adf228..92636f75483bb86ebbc01d356fbeb77c70f43b18 100644 (file)
@@ -23,7 +23,7 @@ using namespace folly::chrono;
 namespace {
 
 class ChronoTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(ChronoTest, ceil_duration) {
   EXPECT_EQ(seconds(7), ceil<seconds>(seconds(7)));
index 020a7bf78701b93b34a0c151f20af94e49b5c46e..762c6f5cf569376a96ad04041c06821f6e54cb2e 100644 (file)
@@ -605,7 +605,7 @@ BENCHMARK_PARAM(BM_ContentionStdSet, 1048576);
 BENCHMARK_PARAM(BM_ContentionCSL,    1048576);
 BENCHMARK_DRAW_LINE();
 
-}
+} // namespace
 
 int main(int argc, char** argv) {
   google::InitGoogleLogging(argv[0]);
index 301a70548f015dea9ad998c9088a6cffb72762be..c6c0a8acdbe1957b2efc900fa70e2da65b9a6581 100644 (file)
@@ -58,12 +58,12 @@ struct ParanoidArenaAlloc {
   ParentAlloc* arena_;
   std::set<void*> allocated_;
 };
-}
+} // namespace
 
 namespace folly {
 template <>
 struct IsArenaAllocator<ParanoidArenaAlloc<SysArena>> : std::true_type {};
-}
+} // namespace folly
 
 namespace {
 
index 73b6c90f6ff6b4c8a3dc1dcf94986fb31574b233..6c0c71f9c9a2f277b22dcc6a6853b81cf6684c00 100644 (file)
@@ -21,7 +21,7 @@
 namespace {
 
 class ConstexprMathTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(ConstexprMathTest, constexpr_min) {
   constexpr auto x = uint16_t(3);
index fb00363d5f6702a1979eb78ee90c75d5389107af..5cf2a47a15a86398d80320ebd4a1275bcfe46b8b 100644 (file)
@@ -244,8 +244,8 @@ __int128 int128Neg[] = {
 };
 
 #endif
-}
-}
+} // namespace conv_bench_detail
+} // namespace folly
 
 using namespace folly::conv_bench_detail;
 
@@ -255,7 +255,7 @@ template <typename T>
 void checkArrayIndex(const T& array, size_t index) {
   DCHECK_LT(index, sizeof(array) / sizeof(array[0]));
 }
-}
+} // namespace
 
 ////////////////////////////////////////////////////////////////////////////////
 // Benchmarks for ASCII to int conversion
@@ -511,8 +511,8 @@ char reallyShort[] = "meh";
 std::string stdString = "std::strings are very nice";
 float fValue = 1.2355f;
 double dValue = 345345345.435;
-}
-}
+} // namespace conv_bench_detail
+} // namespace folly
 
 BENCHMARK(preallocateTestNoFloat, n) {
   for (size_t i = 0; i < n; ++i) {
@@ -586,8 +586,8 @@ uint64_t u64s[] = {
     static_cast<uint64_t>(1) << 50,
     static_cast<uint64_t>(1) << 63,
 };
-}
-}
+} // namespace conv_bench_detail
+} // namespace folly
 
 BENCHMARK(preallocateTestInt8, n) {
   for (size_t i = 0; i < n; ++i) {
@@ -675,7 +675,7 @@ unsigned __int128 u128s[] = {
     static_cast<unsigned __int128>(1) << 100,
     static_cast<unsigned __int128>(1) << 127,
 };
-}
+} // namespace
 
 BENCHMARK(preallocateTestInt128, n) {
   for (size_t i = 0; i < n; ++i) {
@@ -1012,8 +1012,8 @@ std::array<double, 4> double2FloatGood{{1.0, 1.25, 2.5, 1000.0}};
 std::array<double, 4> double2FloatBad{{1e100, 1e101, 1e102, 1e103}};
 std::array<double, 4> double2IntGood{{1.0, 10.0, 100.0, 1000.0}};
 std::array<double, 4> double2IntBad{{1e100, 1.25, 2.5, 100.00001}};
-}
-}
+} // namespace conv_bench_detail
+} // namespace folly
 
 #define STRING_TO_TYPE_BENCHMARK(type, name, pass, fail) \
   BENCHMARK(stringTo##name##Classic, n) {                \
index 5fbbeed3a42bbb5c41b376b2c975d9b281a9ce72..115a32bfc0edffd144f6fe285ab2d9f6884a39ed 100644 (file)
@@ -935,7 +935,7 @@ void testConvError(
     }
   }
 }
-}
+} // namespace
 
 #define EXPECT_CONV_ERROR_QUOTE(expr, code, value, quoted) \
   testConvError(                                           \
@@ -1033,7 +1033,7 @@ std::string prefixWithType(V value) {
   oss << to<std::string>(value);
   return oss.str();
 }
-}
+} // namespace
 
 #define EXPECT_CONV_ERROR_ARITH(type, val, code) \
   EXPECT_CONV_ERROR_QUOTE(                       \
@@ -1239,7 +1239,7 @@ size_t estimateSpaceNeeded(const Dimensions&in) {
   return 2000 + folly::estimateSpaceNeeded(in.w) +
       folly::estimateSpaceNeeded(in.h);
 }
-}
+} // namespace my
 
 TEST(Conv, custom_kkproviders) {
   my::Dimensions expected{7, 8};
index 1272c42a719e5c60c8cc5a41e1f1ccc566a1ba72..21029e182684d7feb4c65b003f7500fbb0591564 100644 (file)
@@ -277,8 +277,8 @@ void DeterministicSchedule::wait(sem_t* sem) {
     // we're not busy waiting because this is a deterministic schedule
   }
 }
-}
-}
+} // namespace test
+} // namespace folly
 
 namespace folly {
 namespace detail {
@@ -382,7 +382,7 @@ int Futex<DeterministicAtomic>::futexWake(int count, uint32_t wakeMask) {
   DeterministicSchedule::afterSharedAccess();
   return rv;
 }
-}
+} // namespace detail
 
 template <>
 CacheLocality const& CacheLocality::system<test::DeterministicAtomic>() {
@@ -394,4 +394,4 @@ template <>
 Getcpu::Func AccessSpreader<test::DeterministicAtomic>::pickGetcpuFunc() {
   return &detail::DeterministicSchedule::getcpu;
 }
-}
+} // namespace folly
index 91c7b6ef6df9ed9801722d923ccfd75f32c4d445..2ccbac2281bebc96bd78e023c9f45ff972d81d0c 100644 (file)
@@ -223,7 +223,7 @@ template <> struct DynamicConverter<A> {
     return { convertTo<int>(d["i"]) };
   }
 };
-}
+} // namespace folly
 TEST(DynamicConverter, custom_class) {
   dynamic d1 = dynamic::object("i", 17);
   auto i1 = convertTo<A>(d1);
@@ -324,7 +324,7 @@ template <> struct DynamicConverter<Token> {
     return Token(k, lex);
   }
 };
-}
+} // namespace folly
 
 TEST(DynamicConverter, example) {
   dynamic d1 = dynamic::object("KIND", 2)("LEXEME", "a token");
@@ -454,7 +454,7 @@ struct DynamicConverter<B> {
     return B(convertTo<int>(d));
   }
 };
-}
+} // namespace folly
 
 TEST(DynamicConverter, double_destroy) {
   dynamic d = dynamic::array(1, 3, 5, 7, 9, 11, 13, 15, 17);
index eb7965039412de93b83fa0877f1d09b1a6ecbae4..11623addad1d4e1b37156775a76528f58c24eb9b 100644 (file)
@@ -90,4 +90,5 @@ TEST(ExceptionTest, Simple) {
                       EIO, "hello world");
 }
 
-}}  // namespaces
+} // namespace test
+} // namespace folly
index fdb68407296d159d76f2ab0ac4717f38e676e3d9..68dbc441c7643dbb7d8a56a25e51ebf0480311ac 100644 (file)
@@ -434,7 +434,7 @@ TEST(ExceptionWrapper, with_exception_deduction_returning) {
 namespace {
 template <typename T>
 T& r_to_l(T v) { return std::ref(v); }
-}
+} // namespace
 
 TEST(ExceptionWrapper, with_exception_deduction_functor_lvalue) {
   auto ew = make_exception_wrapper<std::runtime_error>("hi");
@@ -501,7 +501,7 @@ exception_wrapper testNonStdException() {
     return exception_wrapper{std::current_exception(), e};
   }
 }
-}
+} // namespace
 
 TEST(ExceptionWrapper, base_derived_non_std_exception_test) {
   auto ew = testNonStdException();
@@ -519,7 +519,7 @@ struct BigRuntimeError : std::runtime_error {
 struct BigNonStdError {
   char data_[sizeof(exception_wrapper) + 1]{};
 };
-}
+} // namespace
 
 TEST(ExceptionWrapper, handle_std_exception) {
   auto ep = std::make_exception_ptr(std::runtime_error{"hello world"});
index 6e377b353ebb010619274469bb7dd93764c3e1f3..a3935e8c6c3924469a32b7b8a33d9b2ae9ede619 100644 (file)
@@ -744,4 +744,4 @@ TEST(Expected, ThenOrThrow) {
         Unexpected<E>::BadExpectedAccess);
   }
 }
-}
+} // namespace folly
index 629111db23f3919d9ce9807172edf4c325971ecf..08e22608078df07217b1bb0da89120ffe40e2da7 100644 (file)
@@ -75,7 +75,7 @@ std::list<char> RandomList(unsigned int maxSize) {
  }
   return lst;
 }
-}
+} // namespace
 
 ////////////////////////////////////////////////////////////////////////////////
 // Tests begin here
index 2920a4f9594f66dc03658afc053574d3997f7fb1..98e284cbc74e870ed85d20d15af48396739fd3dd 100644 (file)
@@ -67,7 +67,7 @@ template <class T> T randomObject();
 template <> int randomObject<int>() {
   return random(0, 1024);
 }
-}
+} // namespace
 
 ////////////////////////////////////////////////////////////////////////////////
 // Tests begin here
@@ -123,7 +123,7 @@ TEST(fbvector, works_with_std_string) {
 
 namespace {
 class UserDefinedType { int whatevs_; };
-}
+} // namespace
 
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE(UserDefinedType);
 
index 8b6f74374e23f7e72caab7c79d642e4778f4d487..2100681eb739b51660010fdefd137a81d0dd1c7f 100644 (file)
@@ -494,7 +494,8 @@ TEST_F(WriteFileAtomic, multipleFiles) {
   EXPECT_EQ(0440, getPerms(tmpPath("foo_txt")));
   EXPECT_EQ(0444, getPerms(tmpPath("foo.txt2")));
 }
-}}  // namespaces
+} // namespace test
+} // namespace folly
 
 #if defined(__linux__)
 namespace {
@@ -520,7 +521,7 @@ class FChmodFailure {
 };
 
 std::atomic<int> FChmodFailure::forceFailure_{0};
-}
+} // namespace
 
 // Replace the system fchmod() function with our own stub, so we can
 // trigger failures in the writeFileAtomic() tests.
@@ -570,6 +571,6 @@ TEST_F(WriteFileAtomic, chmodFailure) {
   EXPECT_EQ(0600, getPerms(path));
   EXPECT_EQ(set<string>{"foo"}, listTmpDir());
 }
-}
-}
+} // namespace test
+} // namespace folly
 #endif
index 535c6ceb463b0a501971e7b468aa1be488432e6c..3bb739bb94f75b5a352eebea9122cf51fcc08e2a 100644 (file)
@@ -542,7 +542,7 @@ class FormatValue<NoncopyableInt> {
   const NoncopyableInt& v_;
 };
 
-} // namespace
+} // namespace folly
 
 TEST(Format, NoncopyableArg) {
   {
index e7e692f67f5469f350145d2ded6f807c3289fee2..16436413a57991e22d62e1ff7139e737c467e8bf 100644 (file)
@@ -318,4 +318,4 @@ TEST(FunctionScheduler, SteadyCatchup) {
   EXPECT_NEAR(100, ticks.load(), 10);
 }
 
-}
+} // namespace folly
index 4595a6e66070abaf8fa528993a98135fa9c2d025..8c586aa91a168099cf4065d3153462468f2fcd1c 100644 (file)
@@ -81,7 +81,7 @@ struct FNV64 {
   }
 };
 
-}
+} // namespace detail
 
 int main(int argc, char** argv) {
   gflags::ParseCommandLineFlags(&argc, &argv, true);
index 759f9975984cc9bf6c01504253683a491d93f6fc..9521aee7f61dc9e2fbc2289ef6c0586e83042deb 100644 (file)
@@ -360,7 +360,7 @@ template <class T>
 size_t hash_vector(const std::vector<T>& v) {
   return hash_range(v.begin(), v.end());
 }
-}
+} // namespace
 
 TEST(Hash, hash_range) {
   EXPECT_EQ(hash_vector<int32_t>({1, 2}), hash_vector<int16_t>({1, 2}));
index b5ca965690a4a22145b25e1af7a7b4cc2aa1c597..ad57b1faf375d9f40e7c89546d7507bb7f9f17b7 100644 (file)
@@ -47,7 +47,7 @@ struct Magic {
 };
 
 class IndestructibleTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(IndestructibleTest, access) {
   static const Indestructible<map<string, int>> data{
index b11dc11ee17667881dc675a2206ca9899699e539..947ee8dbc5b08896e317718c1a68a11fc16cbbe3 100644 (file)
@@ -106,4 +106,4 @@ TEST(Lazy, Consty) {
   EXPECT_EQ(lz(), 12);
 }
 
-}
+} // namespace folly
index 6c5b1b9703c85d0fb514c20c22d56b83511450af..35efdb46db3067e85ab94e75537cc4cc62a03857 100644 (file)
@@ -156,7 +156,8 @@ TEST(MPMCPipeline, MultiThreaded) {
   }
 }
 
-}}  // namespaces
+} // namespace test
+} // namespace folly
 
 int main(int argc, char *argv[]) {
   testing::InitGoogleTest(&argc, argv);
index 32ffdba460e8f1bd907f3733bcf801d8e33712f1..52e63e81f7a900360a54a6d3ccd5f0fc1cf2f4be 100644 (file)
@@ -164,7 +164,7 @@ struct Compiles<
         std::declval<std::map<int, element_type_t<T>>>(),
         std::declval<int>(),
         std::declval<T>()))>> : std::true_type {};
-}
+} // namespace
 
 TEST(MapUtil, get_default_temporary) {
   EXPECT_TRUE(Compiles<const int&>::value);
@@ -238,7 +238,7 @@ struct GetRefDefaultPathCompiles<
         std::declval<int>(),
         std::declval<int>(),
         std::declval<T>()))>> : std::true_type {};
-}
+} // namespace
 
 TEST(MapUtil, get_ref_default_path_temporary) {
   EXPECT_TRUE(GetRefDefaultPathCompiles<const int&>::value);
index e3ef00d4f23a35f800fabf0c30dee6f2c8ccc13e..153296e443e240f642d4d7d8b7ce89764a66a6d8 100644 (file)
@@ -89,7 +89,7 @@ void runDivTests(const F& func, size_t iters) {
     }
   }
 }
-}
+} // namespace
 
 BENCHMARK_DRAW_LINE();
 BENCHMARK(divTruncInt8, iters) {
index dba0d35c6ef1375df42f0d4af5a2e480829701db..84514b0fcd03a5d0f1aed8796800931806303802 100644 (file)
@@ -146,7 +146,7 @@ void runDivTests() {
     }
   }
 }
-}
+} // namespace
 
 TEST(Bits, divTestInt8) {
   runDivTests<int8_t, int8_t, int64_t>();
index f9f5a4336e8614cab2b0375438b69edc4c97ba3e..115fbbdf6e2918d4126ab0253453c3af400e435a 100644 (file)
@@ -30,7 +30,7 @@ void init() {
     dst[i] = static_cast<char>(255 - i);
   }
 }
-}
+} // namespace
 
 TEST(memcpy, zero_len)
     FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("nonnull-attribute") {
index bd9a9ecf6a71c5dc1400a6e7de0e3f92e81fc7c5..72546f41e58ffab5aec97e063bab020da706b495 100644 (file)
@@ -100,7 +100,8 @@ struct Futex<MockAtom> {
                FutexResult(uint32_t, const MockClock::time_point&, uint32_t));
 };
 
-}}
+} // namespace detail
+} // namespace folly
 
 TEST(MemoryIdler, futexWaitValueChangedEarly) {
   StrictMock<Futex<MockAtom>> fut;
index 3f2f217edab418f35af1f61286730cb0f7baa928..4b4c933264bdf6ff426a59eeb52083cde1d179cc 100644 (file)
@@ -50,4 +50,4 @@ TEST(makeMoveWrapper, lvalue_copyable) {
   makeMoveWrapper(p);
 }
 
-} // namespace
+} // namespace folly
index b82f3164d1ec183d1c67baddb33efbc597fc5349..091dd9a3714e262669172e99c1a95d35df77eef9 100644 (file)
@@ -663,4 +663,4 @@ TEST(Optional, Hash) {
   std::hash<Optional<int>>()(none);
   std::hash<Optional<int>>()(3);
 }
-}
+} // namespace folly
index f604214453f9a8ded6bb8e6f5134497d5581bf9c..78392e39075e2752b28dae736f9492bbba02be72 100644 (file)
@@ -34,7 +34,7 @@ struct ignore { PackedSyncPtr<int> foo; char c; } FOLLY_PACK_ATTR;
 FOLLY_PACK_POP
 static_assert(sizeof(ignore) == 9, "PackedSyncPtr wasn't packable");
 
-}
+} // namespace
 
 TEST(PackedSyncPtr, Basic) {
   PackedSyncPtr<std::pair<int,int>> sp;
index 35a4942fbb1fb9a1489aaff36d861a691184bc46..a7ce363fa4825cc8109ed50493c37f23c79287ac 100644 (file)
@@ -240,7 +240,7 @@ BENCHMARK_PARAM(BM_ProducerConsumer, 1048574);
 BENCHMARK_PARAM(BM_ProducerConsumerAffinity, 1048574);
 BENCHMARK_PARAM(BM_ProducerConsumerLatency, 1048574);
 
-}
+} // namespace
 
 int main(int argc, char** argv) {
   google::InitGoogleLogging(argv[0]);
index b6dc84c167c3a259549f390d517c87c3975501b7..2bc8ae981e85159504d1725cf5bd0ebe68c576c0 100644 (file)
@@ -213,7 +213,7 @@ struct DtorChecker {
 
 unsigned int DtorChecker::numInstances = 0;
 
-}
+} // namespace
 
 //////////////////////////////////////////////////////////////////////
 
index 385f2d2b8212665016ebc4c8e3b22f97d0a61c9a..8c031f17275772f4ab910e0ee8f6f6e9da4aeefa 100644 (file)
@@ -237,4 +237,4 @@ TEST(RWSpinLock, concurrent_holder_test) {
     << "; upgrades: " << upgrades.load(std::memory_order_acquire);
 }
 
-}
+} // namespace
index e80bb6eae70beddcbc0cc704f022d610e084d97f..db8b60e386fb2196516f02962feebdffb576e787 100644 (file)
@@ -1197,7 +1197,7 @@ bool operator==(MutableStringPiece mp, StringPiece sp) {
 bool operator==(StringPiece sp, MutableStringPiece mp) {
   return mp.compare(sp) == 0;
 }
-}
+} // namespace folly
 
 TEST(ReplaceAt, exhaustiveTest) {
   char input[] = "this is nice and long input";
index c28fb225ff8c0d6096f2fd0f49c1570ebd00c350..04fe0707ec1e323427c7af9b4bacbefde53c9017 100644 (file)
@@ -447,7 +447,7 @@ TEST(Singleton, SingletonConcurrencyStress) {
 
 namespace {
 struct EagerInitSyncTag {};
-}
+} // namespace
 template <typename T, typename Tag = detail::DefaultTag>
 using SingletonEagerInitSync = Singleton<T, Tag, EagerInitSyncTag>;
 TEST(Singleton, SingletonEagerInitSync) {
@@ -465,7 +465,7 @@ TEST(Singleton, SingletonEagerInitSync) {
 
 namespace {
 struct EagerInitAsyncTag {};
-}
+} // namespace
 template <typename T, typename Tag = detail::DefaultTag>
 using SingletonEagerInitAsync = Singleton<T, Tag, EagerInitAsyncTag>;
 TEST(Singleton, SingletonEagerInitAsync) {
@@ -522,7 +522,7 @@ class TestEagerInitParallelExecutor : public folly::Executor {
 
 namespace {
 struct EagerInitParallelTag {};
-}
+} // namespace
 template <typename T, typename Tag = detail::DefaultTag>
 using SingletonEagerInitParallel = Singleton<T, Tag, EagerInitParallelTag>;
 TEST(Singleton, SingletonEagerInitParallel) {
index 6a2b01e5d31a6af06bb7aec7bd4c6b38e549f975..774dc981a49300dd3977259e4e2d107dea13586a 100644 (file)
@@ -33,7 +33,7 @@ using namespace folly;
 
 namespace {
 Singleton<GlobalWatchdog> global_watchdog;
-}
+} // namespace
 
 // Test basic global usage (the default way singletons will generally
 // be used).
index 6f223daeffdf6ae515e8261e3b08a8714e66bc0f..920dc1c02c330b72042b81025a8851ea365775cb 100644 (file)
@@ -23,7 +23,7 @@ namespace {
 // subclasses are created, and the ordering.  Also tracks a global
 // unique counter for each object.
 std::atomic<size_t> global_counter(19770326);
-}
+} // namespace
 
 std::vector<Watchdog*>& Watchdog::creation_order() {
   static std::vector<Watchdog*> ret;
index 4703dde525bed100eea5a8fd21862d3132a03bc3..8397bb88e2c0f0cb7b31ca437e6fcee23a528dde 100644 (file)
@@ -37,7 +37,7 @@ struct Foo {
 };
 using FooSingletonTL = SingletonThreadLocal<Foo>;
 FooSingletonTL theFooSingleton;
-}
+} // namespace
 
 TEST(SingletonThreadLocalTest, OneSingletonPerThread) {
   static constexpr std::size_t targetThreadCount{64};
index 8a1d6a35cc522e3b721d9b5c31cd60ee6b6d31e2..7bdfe917a77762ec596249cc84523fef346ba0b8 100644 (file)
@@ -63,7 +63,7 @@ struct SimpleBarrier {
   size_t num_{0};
   size_t count_;
 };
-}
+} // namespace
 
 template <typename Lock>
 class InitLock {
index fdb8bb9d20243fec10a32cf03227e2bfda4c4d1d..32a20d77fa3cc54f31ac2ba6b4655e0c5f4381e9 100644 (file)
@@ -135,7 +135,7 @@ struct TestClobber {
   MicroSpinLock lock_;
 };
 
-}
+} // namespace
 
 TEST(SmallLocks, SpinLockCorrectness) {
   EXPECT_EQ(sizeof(MicroSpinLock), 1);
@@ -216,7 +216,7 @@ struct SimpleBarrier {
   std::condition_variable cv_;
   bool ready_;
 };
-}
+} // namespace
 
 TEST(SmallLocks, MicroLock) {
   volatile uint64_t counters[4] = {0, 0, 0, 0};
index f0324335336c6c967830b7d7efa8272fb2e72ca8..5212d985843c803cbdcd71027aa0c820c5e16a20 100644 (file)
@@ -47,4 +47,4 @@ bool SocketAddressTestHelper::isFamilyOfAddrEnabled(const char* addr) {
   freeaddrinfo(resultsp);
   return !err;
 }
-}
+} // namespace folly
index 062837f1df9b6fc661c0ac40b1643c881b90f5fe..0191f525d538bb65f7fd988eddb1be9f1f87ec3b 100644 (file)
@@ -41,4 +41,4 @@ class SocketAddressTestHelper {
  private:
   static bool isFamilyOfAddrEnabled(const char* addr);
 };
-}
+} // namespace folly
index 7bd2c301b6aed203e53c5dacd637a1dd15611958..5638343056129d0021e7bb918ad41d0c46f32982 100644 (file)
@@ -789,7 +789,7 @@ void piecesTest() {
   EXPECT_EQ(blah.size(), 6);
 }
 
-}
+} // namespace
 
 TEST(Split, split_vector) {
   splitTest<std::vector>();
@@ -949,7 +949,7 @@ Expected<StringPiece, ColorErrorCode> parseTo(
   }
   return StringPiece(in.end(), in.end());
 }
-}
+} // namespace my
 
 TEST(Split, fixed_convert_custom) {
   my::Color c1, c2;
index 8a37f9284573df815267d87910200dfc06d182a7..07c5c3e7818c427e7797d2f4cdc6e2999205adb1 100644 (file)
@@ -195,7 +195,7 @@ void checkFdLeak(const Runnable& r) {
   auto fdsAfter = getOpenFds();
   EXPECT_EQ(fdsAfter.size(), fdsBefore.size());
 }
-}
+} // namespace
 
 // Make sure Subprocess doesn't leak any file descriptors
 TEST(SimpleSubprocessTest, FdLeakTest) {
index 0d34da316d81520f6280e758521b60d4b4d93ac7..4a32f7a0d2525220663fffef826373b043d9e32d 100644 (file)
@@ -877,5 +877,5 @@ template <class Mutex> void testInPlaceConstruction() {
   // This won't compile without in_place
   folly::Synchronized<NotCopiableNotMovable> a(folly::in_place, 5, "a");
 }
-}
-}
+} // namespace sync_tests
+} // namespace folly
index d1256696bc3ba41bf8f4fc553b1c7cb2366be9d1..3eb2a6e3f971d9ce76de868986a814cac8a57c8f 100644 (file)
@@ -58,7 +58,7 @@ template <class Mutex>
 void testConstCopy();
 template <class Mutex>
 void testInPlaceConstruction();
-}
-}
+} // namespace sync_tests
+} // namespace folly
 
 #include <folly/test/SynchronizedTestLib-inl.h>
index 6e3bcb2a1111479ee08e16d9076cab9eb5588310..61b8c020762070a42944a766710e21ed68520c9e 100644 (file)
@@ -45,7 +45,7 @@ AreWithinSecs(T1 val1, T2 val2, std::chrono::seconds acceptableDeltaSecs) {
         << acceptableDeltaSecs.count() << " secs of each other";
   }
 }
-}
+} // namespace test
 
 // Define a PrintTo() function for StringPiece, so that gtest checks
 // will print it as a string.  Without this gtest identifies StringPiece as a
@@ -58,4 +58,4 @@ inline void PrintTo(StringPiece sp, ::std::ostream* os) {
   // standard string types.
   *os << ::testing::PrintToString(sp.str());
 }
-}
+} // namespace folly
index 40b3f443cb67fdf7f33f855dd068c992f31c619a..f4a77d3fc249551e0cb241d9df8d05070fdc5e71 100644 (file)
@@ -71,7 +71,7 @@ void Runner(Counter* counter, uint32_t iterations) {
     }
   }
 }
-}
+} // namespace
 
 // Slow test with fewer threads where there are more busy waits and
 // many calls to readFull().  This attempts to test as many of the
index 7163701b9164c8847b7f217bb495f99869c45c93..6791c0f42902d1a4c731c9cfc3efb40a447eb4a6 100644 (file)
@@ -633,7 +633,8 @@ struct PthreadKeyUnregisterTester {
   PthreadKeyUnregister p;
   constexpr PthreadKeyUnregisterTester() = default;
 };
-}}
+} // namespace threadlocal_detail
+} // namespace folly
 
 TEST(ThreadLocal, UnregisterClassHasConstExprCtor) {
   folly::threadlocal_detail::PthreadKeyUnregisterTester x;
index 1289a07e2617c92ee777cfd5e8bfa958e2fd12ee..b0214d4624b1d4239d979f62c7f357fa4d752d91 100644 (file)
@@ -30,7 +30,7 @@ using namespace std;
 namespace {
 
 FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(has_member_type_x, x);
-}
+} // namespace
 
 TEST(Traits, has_member_type) {
   struct membership_no {};
@@ -57,9 +57,11 @@ struct F3 : T3 { typedef std::false_type IsRelocatable; };
 struct F4 : T1 {};
 
 namespace folly {
-  template <> struct IsRelocatable<T1> : std::true_type {};
-  template <> FOLLY_ASSUME_RELOCATABLE(T2);
-}
+template <>
+struct IsRelocatable<T1> : std::true_type {};
+template <>
+FOLLY_ASSUME_RELOCATABLE(T2);
+} // namespace folly
 
 TEST(Traits, scalars) {
   EXPECT_TRUE(IsRelocatable<int>::value);
@@ -227,7 +229,7 @@ struct has_value_type : std::false_type {};
 template <class T>
 struct has_value_type<T, folly::void_t<typename T::value_type>>
     : std::true_type {};
-}
+} // namespace
 
 TEST(Traits, void_t) {
   EXPECT_TRUE((::std::is_same<folly::void_t<>, void>::value));
index 7e16ee99ac12f6e7de0294cb9b65becbf67a680c..45f1dec9523985804b9b17f8a8ad04c3aa2dca28 100644 (file)
@@ -48,7 +48,7 @@ class MutableContainer {
  public:
   mutable MoveConstructOnly val;
 };
-}
+} // namespace
 
 TEST(Try, basic) {
   A a(5);
index 34ba8692c9604ed431e7586ae19aaf0a94f550c2..c6f269e8345e9fedbe7f5343398fc468f08e54cf 100644 (file)
@@ -22,7 +22,7 @@
 namespace {
 
 class UtilityTest : public testing::Test {};
-}
+} // namespace
 
 TEST_F(UtilityTest, copy) {
   struct MyData {};
index b8799cd2e5552113d938e7f73003e4105ee79e7b..b6b375ae4bde650a74119c89944232902c533205 100644 (file)
@@ -195,7 +195,8 @@ BENCHMARK(VarintDecoding, iters) {
 }
 
 } // namespace
-}}  // namespaces
+} // namespace test
+} // namespace folly
 
 int main(int argc, char *argv[]) {
   testing::InitGoogleTest(&argc, argv);
index 9f1eaf481ef5afd5d0bf26404421ccb7ab20e863..618af54e9cce1fc37534a972d80b7be42f1c349c 100644 (file)
@@ -198,7 +198,7 @@ struct TestBasicGuarantee {
   }
 };
 
-}
+} // namespace
 
 TEST(small_vector, BasicGuarantee) {
   for (int prepop = 1; prepop < 30; ++prepop) {
@@ -942,7 +942,7 @@ class Counter {
     return *this;
   }
 };
-}
+} // namespace
 
 TEST(small_vector, EmplaceBackEfficiency) {
   small_vector<Counter, 2> test;
index 77308b714689f3b7e82f6d44e2f8aea435118f53..fa9c977e09aa4a003f4064d4dfccad8eac0ef3f1 100644 (file)
@@ -76,7 +76,7 @@ struct CountCopyCtor {
   int count_;
 };
 
-}
+} // namespace
 
 TEST(SortedVectorTypes, SimpleSetTest) {
   sorted_vector_set<int> s;
index 1bd3c9667ddedd7d2a7a9cdd8d7ac13100fcdad7..ea218e72dd2f76f77cbdff190830f1f86b690053 100644 (file)
@@ -606,7 +606,7 @@ struct IsRelocatable<Data<f, pad>>
   : std::integral_constant<bool,
       (f & IS_RELOCATABLE) != 0
     > {};
-};
+} // namespace folly
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------