#include <limits>
#include <stdexcept>
#include <utility>
+
#include <boost/intrusive/slist.hpp>
#include <folly/Conv.h>
#include <boost/noncopyable.hpp>
#include <boost/type_traits/is_convertible.hpp>
-#include <stdexcept>
-#include <functional>
#include <atomic>
+#include <functional>
+#include <stdexcept>
#include <folly/AtomicHashArray.h>
#include <folly/Foreach.h>
#pragma once
#include <atomic>
+#include <cstdint>
#include <functional>
+#include <limits>
#include <stdexcept>
#include <system_error>
#include <type_traits>
-#include <stdint.h>
+
+#include <boost/type_traits/has_trivial_destructor.hpp>
#include <folly/Bits.h>
#include <folly/Conv.h>
#include <folly/portability/SysMman.h>
#include <folly/portability/Unistd.h>
-#include <boost/type_traits/has_trivial_destructor.hpp>
-#include <limits>
-
namespace folly {
/// You're probably reading this because you are looking for an
// @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
#include <folly/Benchmark.h>
-#include <folly/Foreach.h>
-#include <folly/json.h>
-#include <folly/String.h>
#include <algorithm>
-#include <boost/regex.hpp>
#include <cmath>
+#include <cstring>
#include <iostream>
#include <limits>
#include <utility>
#include <vector>
-#include <cstring>
+
+#include <boost/regex.hpp>
+
+#include <folly/Foreach.h>
+#include <folly/String.h>
+#include <folly/json.h>
using namespace std;
#define FOLLY_INTRINSIC_CONSTEXPR const
#endif
-#include <folly/Portability.h>
-#include <folly/portability/Builtins.h>
-
-#include <folly/Assume.h>
-#include <folly/detail/BitIteratorDetail.h>
-#include <folly/Likely.h>
-
#include <cassert>
-#include <cstring>
#include <cinttypes>
+#include <cstdint>
+#include <cstring>
#include <iterator>
#include <limits>
#include <type_traits>
+
#include <boost/iterator/iterator_adaptor.hpp>
-#include <stdint.h>
+
+#include <folly/Assume.h>
+#include <folly/Likely.h>
+#include <folly/Portability.h>
+#include <folly/detail/BitIteratorDetail.h>
+#include <folly/portability/Builtins.h>
namespace folly {
#include <mutex>
#include <type_traits>
#include <vector>
+
#include <boost/noncopyable.hpp>
#include <boost/random.hpp>
#include <boost/type_traits.hpp>
#include <limits>
#include <memory>
#include <type_traits>
+
#include <boost/iterator/iterator_facade.hpp>
#include <glog/logging.h>
#pragma once
#include <cstdint>
+
#include <folly/Portability.h>
#ifdef _MSC_VER
#include <folly/Demangle.h>
#include <algorithm>
-#include <string.h>
+#include <cstring>
#include <folly/Malloc.h>
#include <folly/portability/Config.h>
#if FOLLY_HAVE_CPLUS_DEMANGLE_V3_CALLBACK
-# include <cxxabi.h>
+#include <cxxabi.h>
// From libiberty
//
#include <limits>
#include <stdexcept>
+
#include <glog/logging.h>
+
#include <folly/Likely.h>
#include <folly/Portability.h>
#include <folly/detail/DiscriminatedPtrDetail.h>
#pragma once
-#include <folly/dynamic.h>
+#include <iterator>
+#include <type_traits>
+
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/mpl/has_xxx.hpp>
+
+#include <folly/Likely.h>
#include <folly/Traits.h>
+#include <folly/dynamic.h>
namespace folly {
template <typename T> T convertTo(const dynamic&);
* See docs/DynamicConverter.md for supported types and customization
*/
-
-#include <type_traits>
-#include <iterator>
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/mpl/has_xxx.hpp>
-#include <folly/Likely.h>
-
namespace folly {
///////////////////////////////////////////////////////////////////////////////
#include <exception>
#include <functional>
-#include <boost/utility.hpp>
#include <boost/intrusive/list.hpp>
#include <boost/intrusive/unordered_set.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/utility.hpp>
+
#include <folly/portability/BitsFunctexcept.h>
namespace folly {
#pragma once
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <cassert>
+#include <limits>
+
#include <folly/Portability.h>
#include <folly/Range.h>
#include <folly/ScopeGuard.h>
#include <folly/portability/SysUio.h>
#include <folly/portability/Unistd.h>
-#include <cassert>
-#include <limits>
-#include <sys/stat.h>
-#include <sys/types.h>
-
namespace folly {
/**
#pragma once
#include <stdexcept>
+
#include <folly/Conv.h>
#include <folly/Likely.h>
#include <folly/Portability.h>
#pragma once
+#include <cstdint>
+#include <limits>
+
+#include <glog/logging.h>
+
#if !defined(__GNUC__) && !defined(_MSC_VER)
#error GroupVarint.h requires GCC or MSVC
#endif
#if FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 || FOLLY_A64
#define HAVE_GROUP_VARINT 1
-#include <cstdint>
-#include <limits>
-#include <folly/detail/GroupVarintDetail.h>
#include <folly/Bits.h>
#include <folly/Range.h>
+#include <folly/detail/GroupVarintDetail.h>
#include <folly/portability/Builtins.h>
-#include <glog/logging.h>
#if FOLLY_SSE >= 3
#include <nmmintrin.h>
#include <string>
#include <utility> // std::pair
-#include <folly/Range.h>
#include <folly/IPAddressException.h>
#include <folly/IPAddressV4.h>
#include <folly/IPAddressV6.h>
+#include <folly/Range.h>
#include <folly/detail/IPAddress.h>
namespace folly {
#pragma once
-#include <utility>
#include <type_traits>
+#include <utility>
#include <folly/Optional.h>
#pragma once
-#include <string.h>
-#include <stdint.h>
-#include <atomic>
#include <algorithm>
+#include <atomic>
+#include <cstdint>
+#include <cstring>
#include <memory>
#include <system_error>
#include <atomic>
#include <chrono>
+
#include <glog/logging.h>
#ifndef FB_LOG_EVERY_MS
#include <algorithm>
#include <atomic>
-#include <assert.h>
-#include <boost/noncopyable.hpp>
+#include <cassert>
+#include <cstring>
#include <limits>
-#include <string.h>
#include <type_traits>
+#include <boost/noncopyable.hpp>
+
#include <folly/Traits.h>
#include <folly/concurrency/CacheLocality.h>
#include <folly/detail/TurnSequencer.h>
#pragma once
+#include <boost/noncopyable.hpp>
+#include <glog/logging.h>
+
#include <folly/File.h>
#include <folly/Range.h>
-#include <glog/logging.h>
-#include <boost/noncopyable.hpp>
namespace folly {
#pragma once
-#include <assert.h>
+#include <cassert>
#include <climits>
-#include <stdint.h>
-#include <folly/detail/Futex.h>
+#include <cstdint>
+
#include <folly/Portability.h>
+#include <folly/detail/Futex.h>
#if defined(__clang__)
#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
*/
#include <array>
+#include <atomic>
#include <cinttypes>
-#include <type_traits>
-#include <boost/noncopyable.hpp>
#include <cstdlib>
#include <mutex>
-#include <atomic>
+#include <type_traits>
+#include <boost/noncopyable.hpp>
#include <glog/logging.h>
-#include <folly/detail/Sleeper.h>
+
#include <folly/Portability.h>
+#include <folly/detail/Sleeper.h>
namespace folly {
#pragma once
+#include <type_traits>
+
+#include <glog/logging.h>
+
#include <folly/Portability.h>
+#include <folly/SmallLocks.h>
#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_A64
-# error "PackedSyncPtr is x64, ppc64 or aarch64 specific code."
+#error "PackedSyncPtr is x64, ppc64 or aarch64 specific code."
#endif
/*
* @author Jordan DeLong <delong.j@fb.com>
*/
-#include <folly/SmallLocks.h>
-#include <type_traits>
-#include <glog/logging.h>
-
namespace folly {
template<class T>
#include <boost/iterator/iterator_adaptor.hpp>
-#include <folly/Portability.h>
#include <folly/ContainerTraits.h>
+#include <folly/Portability.h>
/**
* Code that aids in storing data aligned on block (possibly cache-line)
#include <atomic>
#include <cinttypes>
#include <cstdlib>
-#include <folly/Portability.h>
#include <mutex>
#include <type_traits>
-#include <folly/detail/Sleeper.h>
#include <glog/logging.h>
+#include <folly/Portability.h>
+#include <folly/detail/Sleeper.h>
+
#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64
-# error "PicoSpinLock.h is currently x64, aarch64 and ppc64 only."
+#error "PicoSpinLock.h is currently x64, aarch64 and ppc64 only."
#endif
namespace folly {
#include <folly/Portability.h>
#include <folly/portability/Asm.h>
-#if defined(__GNUC__) && \
- (defined(__i386) || FOLLY_X64 || \
- defined(ARCH_K8))
-# define RW_SPINLOCK_USE_X86_INTRINSIC_
-# include <x86intrin.h>
+#if defined(__GNUC__) && (defined(__i386) || FOLLY_X64 || defined(ARCH_K8))
+#define RW_SPINLOCK_USE_X86_INTRINSIC_
+#include <x86intrin.h>
#elif defined(_MSC_VER) && defined(FOLLY_X64)
-# define RW_SPINLOCK_USE_X86_INTRINSIC_
+#define RW_SPINLOCK_USE_X86_INTRINSIC_
#else
-# undef RW_SPINLOCK_USE_X86_INTRINSIC_
+#undef RW_SPINLOCK_USE_X86_INTRINSIC_
#endif
// iOS doesn't define _mm_cvtsi64_si128 and friends
#include <folly/Random.h>
+#include <array>
#include <atomic>
#include <mutex>
#include <random>
-#include <array>
#include <folly/CallOnce.h>
#include <folly/File.h>
#include <glog/logging.h>
#ifdef _MSC_VER
-# include <wincrypt.h> // @manual
+#include <wincrypt.h> // @manual
#endif
namespace folly {
#pragma once
#define FOLLY_RANDOM_H_
-#include <type_traits>
+#include <cstdint>
#include <random>
-#include <stdint.h>
+#include <type_traits>
+
#include <folly/Portability.h>
#if FOLLY_HAVE_EXTRANDOM_SFMT19937
#pragma once
-#include <folly/ThreadLocal.h>
#include <folly/Singleton.h>
+#include <folly/ThreadLocal.h>
namespace folly {
#include <folly/SocketAddress.h>
-#include <folly/CppAttributes.h>
-#include <folly/Exception.h>
-#include <folly/Hash.h>
-
-#include <boost/functional/hash.hpp>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
#include <sstream>
#include <string>
#include <system_error>
+#include <boost/functional/hash.hpp>
+
+#include <folly/CppAttributes.h>
+#include <folly/Exception.h>
+#include <folly/Hash.h>
+
namespace {
/**
#pragma once
#include <cstdint>
+
#include <glog/logging.h>
namespace folly {
#pragma once
-#include <stdexcept>
#include <iterator>
+#include <stdexcept>
#include <folly/CppAttributes.h>
#include <folly/String.h>
-#include <folly/ScopeGuard.h>
-
+#include <cctype>
#include <cerrno>
#include <cstdarg>
#include <cstring>
-#include <stdexcept>
#include <iterator>
-#include <cctype>
-#include <string.h>
+#include <stdexcept>
+
#include <glog/logging.h>
+#include <folly/ScopeGuard.h>
+
namespace folly {
static inline bool is_oddspace(char c) {
#pragma once
#define FOLLY_STRING_H_
+#include <cstdarg>
#include <exception>
-#include <stdarg.h>
#include <string>
+#include <unordered_map>
+#include <unordered_set>
#include <vector>
-#include <boost/type_traits.hpp>
-#include <boost/regex/pending/unicode_iterator.hpp>
-#include <unordered_set>
-#include <unordered_map>
+#include <boost/regex/pending/unicode_iterator.hpp>
+#include <boost/type_traits.hpp>
#include <folly/Conv.h>
#include <folly/ExceptionString.h>
#endif
#include <fcntl.h>
-#include <array>
#include <algorithm>
+#include <array>
#include <system_error>
#include <boost/container/flat_set.hpp>
#pragma once
-#include <sys/types.h>
#include <signal.h>
+#include <sys/types.h>
+
#if __APPLE__
#include <sys/wait.h>
#else
#endif
#include <exception>
-#include <vector>
#include <string>
+#include <vector>
#include <boost/container/flat_map.hpp>
#pragma once
-#include <stdint.h>
+#include <cstdint>
#include <functional>
-#include <boost/multi_index_container.hpp>
+
#include <boost/multi_index/indexed_by.hpp>
-#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/member.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index_container.hpp>
namespace folly {
#pragma once
-#include <memory>
+#include <functional>
#include <limits>
+#include <memory>
#include <type_traits>
-#include <functional>
#include <folly/Portability.h>
#include <folly/Uri.h>
-#include <ctype.h>
+#include <cctype>
+
#include <boost/regex.hpp>
namespace folly {
#define __STDC_FORMAT_MACROS 1
#endif
-#include <cstdio>
#include <cinttypes>
+#include <cstdio>
#include <string>
#pragma once
#include <thread>
+
#include <folly/portability/Asm.h>
// Some utilities used by AtomicHashArray and AtomicHashMap
+/*
+ * Copyright 2004-present Facebook, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#pragma once
#include <atomic>
-#include <stdint.h>
+#include <cstdint>
#include <folly/portability/SysMman.h>
#include <folly/portability/Unistd.h>
#include <iterator>
#include <type_traits>
+
#include <boost/iterator/iterator_adaptor.hpp>
namespace folly {
#pragma once
-#include <utility>
#include <type_traits>
+#include <utility>
namespace folly {
namespace dptr_detail {
#pragma once
#include <atomic>
+#include <cassert>
#include <chrono>
#include <limits>
-#include <assert.h>
+
#include <boost/noncopyable.hpp>
#include <folly/portability/Unistd.h>
#pragma once
-#include <string>
#include <sys/types.h>
+
+#include <string>
+
#include <folly/portability/Sockets.h>
namespace folly { namespace detail {
#include <atomic>
#include <chrono>
+
#include <folly/AtomicStruct.h>
#include <folly/Hash.h>
#include <folly/ThreadId.h>
#include <folly/detail/RangeCommon.h>
#include <bitset>
+
#include <folly/SparseByteSet.h>
namespace folly {
#include <algorithm>
#include <string>
+
#include <glog/logging.h>
+
#include <folly/Likely.h>
namespace folly {
* limitations under the License.
*/
-#include "RangeSse42.h"
+#include <folly/detail/RangeSse42.h>
#include <glog/logging.h>
+
#include <folly/Portability.h>
// Essentially, two versions of this file: one with an SSE42 implementation
#pragma once
#include <cstddef>
+
#include <folly/detail/RangeCommon.h>
namespace folly {
#pragma once
#include <folly/Fingerprint.h>
-#include <folly/detail/FingerprintPolynomial.h>
#include <folly/Range.h>
+#include <folly/detail/FingerprintPolynomial.h>
namespace folly {
namespace detail {
#pragma once
#include <functional>
+
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/iterator/iterator_facade.hpp>
-#include <folly/Likely.h>
+
#include <folly/Conv.h>
#include <folly/Format.h>
+#include <folly/Likely.h>
//////////////////////////////////////////////////////////////////////
#pragma once
#include <cstddef>
-#include <type_traits>
#include <limits>
+#include <type_traits>
+
#include <glog/logging.h>
#include <folly/Bits.h>
*/
#pragma once
-#include <folly/Conv.h>
#include <boost/function_types/is_member_pointer.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/mpl/equal.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/mpl/vector.hpp>
+#include <folly/Conv.h>
+
namespace folly {
// Auto-conversion of key/value based on callback signature, documented in
*/
#pragma once
-#include <folly/dynamic.h>
#include <folly/ScopeGuard.h>
+#include <folly/dynamic.h>
namespace folly {
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <folly/Optional.h>
-#include <folly/String.h>
#include <folly/Singleton.h>
+#include <folly/String.h>
#include <folly/json.h>
namespace folly {
#pragma once
#include <folly/ExceptionWrapper.h>
-#include <folly/dynamic.h>
#include <folly/Range.h>
+#include <folly/dynamic.h>
/**
* Validation according to the draft v4 standard: http://json-schema.org/
#pragma once
#include <atomic>
-#include <boost/noncopyable.hpp>
#include <cmath>
+#include <cstring>
#include <memory>
-#include <string.h>
#include <type_traits>
+#include <boost/noncopyable.hpp>
+
#include <folly/Portability.h>
#include <folly/detail/TurnSequencer.h>
#include <folly/portability/TypeTraits.h>
#include <folly/experimental/NestedCommandLineApp.h>
#include <iostream>
+
#include <folly/FileUtil.h>
#include <folly/Format.h>
#include <folly/experimental/io/FsUtil.h>
#pragma once
#include <memory>
+
#include <folly/Range.h>
namespace folly {
#pragma once
#include <initializer_list>
-#include <memory>
#include <map>
+#include <memory>
+
#include <folly/Range.h>
#include <folly/experimental/StringKeyedCommon.h>
#include <initializer_list>
#include <memory>
#include <set>
+
#include <folly/Range.h>
#include <folly/experimental/StringKeyedCommon.h>
#include <folly/experimental/TestUtil.h>
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <boost/regex.hpp>
+
#include <folly/Exception.h>
#include <folly/File.h>
#include <folly/FileUtil.h>
#include <map>
#include <string>
+
#include <folly/Range.h>
#include <folly/ScopeGuard.h>
#include <folly/experimental/io/FsUtil.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include "Bser.h"
+
+#include <folly/experimental/bser/Bser.h>
+
#include <folly/io/Cursor.h>
using namespace folly;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include "Bser.h"
-#include <folly/io/Cursor.h>
+
+#include <folly/experimental/bser/Bser.h>
+
#include <folly/String.h>
+#include <folly/io/Cursor.h>
using namespace folly;
using folly::io::Cursor;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <folly/experimental/bser/Bser.h>
+
#include <folly/String.h>
#include <folly/portability/GTest.h>
#define HAZPTR_STATS true
#define HAZPTR_SCAN_THRESHOLD 10
-#include <folly/experimental/hazptr/test/HazptrUse1.h>
-#include <folly/experimental/hazptr/test/HazptrUse2.h>
+#include <folly/experimental/hazptr/debug.h>
#include <folly/experimental/hazptr/example/LockFreeLIFO.h>
#include <folly/experimental/hazptr/example/SWMRList.h>
#include <folly/experimental/hazptr/example/WideCAS.h>
-#include <folly/experimental/hazptr/debug.h>
#include <folly/experimental/hazptr/hazptr.h>
+#include <folly/experimental/hazptr/test/HazptrUse1.h>
+#include <folly/experimental/hazptr/test/HazptrUse2.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#pragma once
#include <sys/types.h>
-#include <libaio.h>
#include <atomic>
#include <cstdint>
#include <vector>
#include <boost/noncopyable.hpp>
+#include <libaio.h>
#include <folly/Portability.h>
#include <folly/Range.h>
#include <folly/experimental/io/HugePages.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <fcntl.h>
#include <cctype>
#include <cstring>
#include <folly/experimental/io/AsyncIO.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <fcntl.h>
-#include <cstdlib>
#include <cstdio>
+#include <cstdlib>
#include <memory>
#include <random>
#include <thread>
#include <glog/logging.h>
-#include <folly/experimental/io/FsUtil.h>
#include <folly/ScopeGuard.h>
#include <folly/String.h>
+#include <folly/experimental/io/FsUtil.h>
#include <folly/portability/GTest.h>
#include <folly/portability/Sockets.h>
#include <boost/variant.hpp>
-#include <folly/experimental/symbolizer/Elf.h>
#include <folly/Range.h>
+#include <folly/experimental/symbolizer/Elf.h>
namespace folly {
namespace symbolizer {
#pragma once
#define FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_
-#include <stdio.h>
#include <elf.h>
-#include <link.h> // For ElfW()
+#include <link.h> // For ElfW()
+#include <cstdio>
#include <stdexcept>
#include <system_error>
#pragma once
+#include <climits> // for PATH_MAX
#include <cstring>
-#include <limits.h> // for PATH_MAX
#include <memory>
#include <mutex>
#include <string>
-#include <vector>
#include <unordered_map>
+#include <vector>
-#include <boost/operators.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/intrusive/list.hpp>
+#include <boost/operators.hpp>
#include <glog/logging.h>
#include <folly/Hash.h>
#include <folly/experimental/symbolizer/Symbolizer.h>
+#include <link.h>
+
+#include <climits>
#include <cstdio>
#include <cstdlib>
#include <iostream>
-#include <limits.h>
-#include <link.h>
#ifdef __GNUC__
#include <ext/stdio_filebuf.h>
#include <folly/FBString.h>
#include <folly/Range.h>
#include <folly/String.h>
-#include <folly/io/IOBuf.h>
+#include <folly/experimental/symbolizer/Dwarf.h>
#include <folly/experimental/symbolizer/Elf.h>
#include <folly/experimental/symbolizer/ElfCache.h>
-#include <folly/experimental/symbolizer/Dwarf.h>
#include <folly/experimental/symbolizer/StackTrace.h>
+#include <folly/io/IOBuf.h>
namespace folly {
namespace symbolizer {
#include <folly/experimental/symbolizer/test/SignalHandlerTest.h>
#include <folly/experimental/symbolizer/SignalHandler.h>
+#include <folly/CPortability.h>
#include <folly/FileUtil.h>
#include <folly/Range.h>
-#include <folly/CPortability.h>
#include <folly/portability/GTest.h>
namespace folly { namespace symbolizer { namespace test {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <atomic>
-#include <glog/logging.h>
-#include <random>
#include <memory>
+#include <random>
+
+#include <glog/logging.h>
#include <folly/Benchmark.h>
#include <folly/experimental/Bits.h>
#include <limits>
#include <random>
#include <string>
-#include <vector>
#include <unordered_set>
+#include <vector>
+
#include <glog/logging.h>
#include <folly/portability/GTest.h>
#include <random>
#include <thread>
#include <vector>
+
#include <glog/logging.h>
#include <folly/Random.h>
* limitations under the License.
*/
-#include <folly/experimental/FlatCombiningPriorityQueue.h>
#include <folly/Benchmark.h>
+#include <folly/experimental/FlatCombiningPriorityQueue.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
#include <thread>
#include <folly/experimental/LockFreeRingBuffer.h>
-#include <folly/test/DeterministicSchedule.h>
#include <folly/portability/GTest.h>
+#include <folly/test/DeterministicSchedule.h>
namespace folly {
// Implements two commands: "cat" and "echo", which behave similarly to their
// Unix homonyms.
-#include <folly/String.h>
#include <folly/ScopeGuard.h>
+#include <folly/String.h>
#include <folly/experimental/NestedCommandLineApp.h>
#include <folly/experimental/ProgramOptions.h>
*/
#include <iostream>
+
+#include <glog/logging.h>
+
#include <folly/Conv.h>
#include <folly/experimental/ProgramOptions.h>
-#include <glog/logging.h>
DEFINE_bool(flag_bool_true, true, "Bool with true default value");
DEFINE_bool(flag_bool_false, false, "Bool with false default value");
/* -*- Mode: C++; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
#include <atomic>
-#include <thread>
-#include <mutex>
-#include <folly/Memory.h>
#include <condition_variable>
+#include <mutex>
+#include <thread>
#include <folly/Baton.h>
+#include <folly/Memory.h>
#include <folly/experimental/RCURefCount.h>
#include <folly/experimental/ReadMostlySharedPtr.h>
#include <folly/portability/GTest.h>
#include <chrono>
#include <random>
#include <thread>
+
#include <folly/Baton.h>
#include <folly/Optional.h>
#include <folly/Random.h>
-#include <folly/futures/detail/Core.h>
#include <folly/futures/Timekeeper.h>
+#include <folly/futures/detail/Core.h>
#if FOLLY_MOBILE || defined(__APPLE__)
#define FOLLY_FUTURE_USING_FIBER 0
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <folly/futures/Future.h>
-#include <folly/futures/ThreadWheelTimekeeper.h>
#include <folly/Likely.h>
+#include <folly/futures/ThreadWheelTimekeeper.h>
namespace folly {
*/
#pragma once
-#include <folly/LifoSem.h>
-#include <folly/futures/DrivableExecutor.h>
-#include <folly/futures/ScheduledExecutor.h>
+
+#include <cstdio>
#include <memory>
#include <mutex>
#include <queue>
-#include <cstdio>
+
+#include <folly/LifoSem.h>
+#include <folly/futures/DrivableExecutor.h>
+#include <folly/futures/ScheduledExecutor.h>
namespace folly {
/// A ManualExecutor only does work when you turn the crank, by calling
#pragma once
-#include <folly/futures/Promise.h>
#include <folly/Portability.h>
+#include <folly/futures/Promise.h>
namespace folly {
#pragma once
-#include <folly/futures/detail/Types.h>
#include <folly/Unit.h>
+#include <folly/futures/detail/Types.h>
namespace folly {
#include <atomic>
#include <mutex>
+
#include <folly/MicroSpinLock.h>
namespace folly { namespace detail {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include "Koan.h"
+
#include <folly/futures/Future.h>
+#include "Koan.h"
+
using folly::Future;
using folly::makeFuture;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#pragma once
-#include <folly/Portability.h>
-#include <gtest/gtest.h>
+
#include <gflags/gflags.h>
+#include <gtest/gtest.h>
+
+#include <folly/Portability.h>
#include <boost/thread/barrier.hpp>
-#include <folly/futures/Future.h>
#include <folly/Random.h>
-#include <folly/small_vector.h>
+#include <folly/futures/Future.h>
#include <folly/portability/GTest.h>
+#include <folly/small_vector.h>
using namespace folly;
* limitations under the License.
*/
+#include <folly/Baton.h>
#include <folly/futures/Future.h>
#include <folly/futures/InlineExecutor.h>
#include <folly/futures/ManualExecutor.h>
#include <folly/futures/QueuedImmediateExecutor.h>
-#include <folly/Baton.h>
#include <folly/portability/GTest.h>
using namespace folly;
* limitations under the License.
*/
-#include <folly/futures/Future.h>
-#include <folly/Unit.h>
-#include <folly/Memory.h>
+#include <folly/Baton.h>
#include <folly/Executor.h>
+#include <folly/Memory.h>
+#include <folly/Unit.h>
#include <folly/dynamic.h>
-#include <folly/Baton.h>
+#include <folly/futures/Future.h>
#include <folly/portability/GTest.h>
#include <algorithm>
// amazing what things can go wrong if you include things in an unexpected
// order.
#include <folly/Try.h>
-#include <folly/futures/Promise.h>
#include <folly/futures/Future.h>
+#include <folly/futures/Promise.h>
#include <folly/portability/GTest.h>
TEST(Basic, compiles) {
* limitations under the License.
*/
+#include <folly/Baton.h>
#include <folly/futures/Future.h>
#include <folly/futures/Promise.h>
-#include <folly/Baton.h>
#include <folly/portability/GTest.h>
using namespace folly;
* limitations under the License.
*/
+#include <thread>
+
+#include <folly/Baton.h>
+#include <folly/MPMCQueue.h>
+#include <folly/futures/DrivableExecutor.h>
#include <folly/futures/Future.h>
#include <folly/futures/InlineExecutor.h>
#include <folly/futures/ManualExecutor.h>
-#include <folly/futures/DrivableExecutor.h>
-#include <folly/Baton.h>
-#include <folly/MPMCQueue.h>
#include <folly/portability/GTest.h>
-#include <thread>
-
using namespace folly;
struct ManualWaiter : public DrivableExecutor {
#include <queue>
+#include <folly/Baton.h>
#include <folly/futures/Future.h>
#include <folly/io/async/EventBase.h>
-#include <folly/Baton.h>
#include <folly/portability/GTest.h>
using namespace folly;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <atomic>
+
#include <glog/logging.h>
#include <folly/Benchmark.h>
* limitations under the License.
*/
#include <string>
-#include <vector>
#include <tuple>
+#include <vector>
-#include <folly/Range.h>
#include <folly/FBVector.h>
+#include <folly/Range.h>
#include <folly/gen/Base.h>
#include <folly/gen/Combine.h>
#include <folly/portability/GTest.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <thread>
+
#include <glog/logging.h>
#include <folly/Benchmark.h>
* limitations under the License.
*/
-#include <glog/logging.h>
-#include <iostream>
#include <array>
-#include <vector>
#include <future>
+#include <iostream>
+#include <vector>
+
+#include <glog/logging.h>
#include <folly/gen/Base.h>
#include <folly/gen/Parallel.h>
* limitations under the License.
*/
-#include <atomic>
#include <algorithm>
+#include <atomic>
#include <thread>
#include <vector>
* limitations under the License.
*/
-#include <glog/logging.h>
-
-#include <iostream>
#include <array>
+#include <iostream>
#include <vector>
+#include <glog/logging.h>
+
#include <folly/gen/Base.h>
#include <folly/gen/Parallel.h>
#include <folly/portability/GTest.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <atomic>
+
#include <glog/logging.h>
#include <folly/Benchmark.h>
#include <glog/logging.h>
#if FOLLY_HAVE_LIBSNAPPY
-#include <snappy.h>
#include <snappy-sinksource.h>
+#include <snappy.h>
#endif
#if FOLLY_HAVE_LIBZ
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <folly/io/Cursor.h>
#include <cstdio>
+
#include <folly/ScopeGuard.h>
namespace folly {
#pragma once
-#include <assert.h>
+#include <cassert>
#include <cstdarg>
+#include <cstring>
+#include <memory>
#include <stdexcept>
-#include <string.h>
#include <type_traits>
-#include <memory>
#include <folly/Bits.h>
#include <folly/Likely.h>
#include <folly/io/IOBuf.h>
+#include <cassert>
+#include <cstdint>
+#include <cstdlib>
+#include <stdexcept>
+
#include <folly/Conv.h>
#include <folly/Likely.h>
#include <folly/Malloc.h>
#include <folly/SpookyHashV2.h>
#include <folly/io/Cursor.h>
-#include <stdexcept>
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-
using std::unique_ptr;
namespace {
#include <cinttypes>
#include <cstddef>
#include <cstring>
-#include <memory>
#include <limits>
+#include <memory>
#include <type_traits>
#include <boost/iterator/iterator_facade.hpp>
#include <mutex>
#include <folly/File.h>
-#include <folly/Range.h>
#include <folly/MemoryMapping.h>
+#include <folly/Range.h>
#include <folly/io/IOBuf.h>
namespace folly {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#pragma once
-#include <folly/io/async/AsyncTransport.h>
-#include <folly/io/async/EventHandler.h>
-#include <folly/io/async/DelayedDestruction.h>
-#include <folly/io/IOBufQueue.h>
+#pragma once
#include <list>
#include <system_error>
+#include <folly/io/IOBufQueue.h>
+#include <folly/io/async/AsyncTransport.h>
+#include <folly/io/async/DelayedDestruction.h>
+#include <folly/io/async/EventHandler.h>
+
namespace folly {
class AsyncSocketException;
#include <iomanip>
+#include <folly/Bits.h>
#include <folly/Optional.h>
#include <folly/String.h>
+#include <folly/io/Cursor.h>
+#include <folly/io/IOBuf.h>
#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/AsyncTimeout.h>
#include <folly/io/async/SSLContext.h>
#include <folly/io/async/TimeoutManager.h>
-#include <folly/ssl/OpenSSLPtrTypes.h>
#include <folly/io/async/ssl/OpenSSLUtils.h>
#include <folly/io/async/ssl/SSLErrors.h>
#include <folly/io/async/ssl/TLSDefinitions.h>
-
-#include <folly/Bits.h>
-#include <folly/io/IOBuf.h>
-#include <folly/io/Cursor.h>
#include <folly/portability/OpenSSL.h>
#include <folly/portability/Sockets.h>
+#include <folly/ssl/OpenSSLPtrTypes.h>
namespace folly {
#include <sys/types.h>
#include <chrono>
-#include <memory>
#include <map>
+#include <memory>
namespace folly {
#include <folly/io/async/AsyncSocketBase.h>
#include <folly/io/async/DelayedDestruction.h>
#include <folly/io/async/EventBase.h>
-#include <folly/ssl/OpenSSLPtrTypes.h>
#include <folly/portability/OpenSSL.h>
#include <folly/portability/SysUio.h>
+#include <folly/ssl/OpenSSLPtrTypes.h>
constexpr bool kOpenSslModeMoveBufferOwnership =
#ifdef SSL_MODE_MOVE_BUFFER_OWNERSHIP
#pragma once
-#include <folly/io/IOBufQueue.h>
#include <folly/Memory.h>
+#include <folly/io/IOBufQueue.h>
#include <folly/io/async/AsyncUDPSocket.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/AsyncUDPSocket.h>
-#include <folly/io/async/EventBase.h>
#include <folly/Likely.h>
+#include <folly/io/async/EventBase.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#pragma once
-#include <folly/io/IOBuf.h>
+#include <memory>
+
#include <folly/ScopeGuard.h>
-#include <folly/io/async/AsyncSocketException.h>
+#include <folly/SocketAddress.h>
+#include <folly/io/IOBuf.h>
#include <folly/io/async/AsyncSocketBase.h>
-#include <folly/io/async/EventHandler.h>
+#include <folly/io/async/AsyncSocketException.h>
#include <folly/io/async/EventBase.h>
-#include <folly/SocketAddress.h>
-
-#include <memory>
+#include <folly/io/async/EventHandler.h>
namespace folly {
#pragma once
#include <atomic>
+#include <cerrno>
+#include <cmath>
#include <cstdlib>
-#include <errno.h>
#include <functional>
#include <list>
-#include <math.h>
#include <memory>
#include <mutex>
#include <queue>
#include <boost/intrusive/list.hpp>
#include <boost/utility.hpp>
+#include <glog/logging.h>
#include <folly/CallOnce.h>
#include <folly/Executor.h>
#include <folly/io/async/Request.h>
#include <folly/io/async/TimeoutManager.h>
#include <folly/portability/Event.h>
-#include <glog/logging.h>
namespace folly {
#pragma once
+#include <list>
+#include <set>
+
#include <folly/ThreadLocal.h>
#include <folly/io/async/EventBase.h>
-#include <set>
-#include <list>
namespace folly {
#endif
#ifdef FOLLY_HAVE_FEATURES_H
-# include <features.h>
+#include <features.h>
#endif
#if defined(__GLIBC__) && !defined(__APPLE__)
#include <sys/eventfd.h>
#else /* !def FOLLY_GLIBC_2_9 */
+#include <fcntl.h>
#include <sys/syscall.h>
#include <unistd.h>
-#include <fcntl.h>
// Use existing __NR_eventfd2 if already defined
// Values from the Linux kernel source:
#pragma once
+#include <cstddef>
+
+#include <boost/noncopyable.hpp>
#include <glog/logging.h>
+
#include <folly/io/async/EventUtil.h>
#include <folly/portability/Event.h>
-#include <boost/noncopyable.hpp>
-#include <stddef.h>
namespace folly {
#include <folly/Exception.h>
#include <folly/FileUtil.h>
-#include <folly/io/async/EventBase.h>
-#include <folly/io/async/EventHandler.h>
-#include <folly/io/async/DelayedDestruction.h>
-#include <folly/io/async/Request.h>
#include <folly/Likely.h>
#include <folly/ScopeGuard.h>
#include <folly/SpinLock.h>
+#include <folly/io/async/DelayedDestruction.h>
+#include <folly/io/async/EventBase.h>
+#include <folly/io/async/EventHandler.h>
+#include <folly/io/async/Request.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#pragma once
-#include <mutex>
#include <list>
#include <map>
-#include <vector>
#include <memory>
-#include <string>
+#include <mutex>
#include <random>
+#include <string>
+#include <vector>
#include <glog/logging.h>
#endif
#include <folly/Range.h>
-#include <folly/ssl/OpenSSLPtrTypes.h>
#include <folly/io/async/ssl/OpenSSLUtils.h>
#include <folly/portability/OpenSSL.h>
+#include <folly/ssl/OpenSSLPtrTypes.h>
namespace folly {
#pragma once
#include <chrono>
-#include <stdint.h>
+#include <cstdint>
#include <folly/Function.h>
#pragma once
#include <folly/Range.h>
-#include <folly/ssl/OpenSSLPtrTypes.h>
#include <folly/portability/OpenSSL.h>
#include <folly/portability/Sockets.h>
+#include <folly/ssl/OpenSSLPtrTypes.h>
namespace folly {
namespace ssl {
* limitations under the License.
*/
+#include <folly/Memory.h>
#include <folly/io/async/AsyncPipe.h>
#include <folly/io/async/EventBase.h>
-#include <folly/Memory.h>
#include <folly/portability/GTest.h>
#include <fcntl.h>
*/
#pragma once
-#include <signal.h>
#include <pthread.h>
+#include <signal.h>
#include <folly/ExceptionWrapper.h>
#include <folly/SocketAddress.h>
*/
#include <iostream>
-#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/AsyncServerSocket.h>
+#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/EventBase.h>
#include <folly/portability/GTest.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <folly/io/async/AsyncTransport.h>
-#include <folly/io/async/AsyncSocket.h>
+#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/test/MockAsyncTransport.h>
#include <folly/portability/GTest.h>
* limitations under the License.
*/
-#include <folly/io/async/AsyncUDPSocket.h>
-#include <folly/io/async/AsyncUDPServerSocket.h>
+#include <folly/SocketAddress.h>
#include <folly/io/async/AsyncTimeout.h>
+#include <folly/io/async/AsyncUDPServerSocket.h>
+#include <folly/io/async/AsyncUDPSocket.h>
#include <folly/io/async/EventBase.h>
-#include <folly/SocketAddress.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
* limitations under the License.
*/
-#include <folly/io/async/HHWheelTimer.h>
#include <folly/io/async/EventBase.h>
+#include <folly/io/async/HHWheelTimer.h>
#include <folly/io/async/test/UndelayedDestruction.h>
#include <folly/io/async/test/Util.h>
#include <folly/portability/GTest.h>
*/
#include <folly/io/async/NotificationQueue.h>
-#include <folly/io/async/ScopedEventBaseThread.h>
-#include <folly/Baton.h>
-#include <folly/portability/GTest.h>
+#include <sys/types.h>
-#include <list>
#include <iostream>
+#include <list>
#include <thread>
-#include <sys/types.h>
+
+#include <folly/Baton.h>
+#include <folly/io/async/ScopedEventBaseThread.h>
+#include <folly/portability/GTest.h>
#ifndef _WIN32
#include <sys/wait.h>
#pragma once
+#include <cassert>
#include <cstdlib>
#include <type_traits>
#include <utility>
-#include <cassert>
namespace folly {
#pragma once
#include <folly/io/async/test/TimeUtil.h>
-#include <folly/test/TestUtils.h>
#include <folly/portability/GTest.h>
+#include <folly/test/TestUtils.h>
/**
* Check how long a timeout took to fire.
#include <folly/io/IOBufQueue.h>
+#include <cstring>
#include <iostream>
#include <stdexcept>
-#include <string.h>
#include <folly/Range.h>
#include <folly/portability/GTest.h>
#pragma once
-#include <stdexcept>
-#include <cstdlib>
-#include <type_traits>
#include <algorithm>
-#include <iterator>
#include <cassert>
+#include <cstdlib>
+#include <iterator>
+#include <stdexcept>
+#include <type_traits>
-#include <boost/operators.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/mpl/if.hpp>
+#include <boost/mpl/count.hpp>
+#include <boost/mpl/empty.hpp>
#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/front.hpp>
#include <boost/mpl/filter_view.hpp>
+#include <boost/mpl/front.hpp>
#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
#include <boost/mpl/placeholders.hpp>
-#include <boost/mpl/empty.hpp>
#include <boost/mpl/size.hpp>
-#include <boost/mpl/count.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/operators.hpp>
+#include <boost/type_traits.hpp>
#include <folly/Assume.h>
#include <folly/FormatTraits.h>
* limitations under the License.
*/
-#include <thread>
#include <memory>
#include <mutex>
+#include <thread>
#include <folly/AtomicHashMap.h>
-#include <folly/ScopeGuard.h>
#include <folly/Memory.h>
+#include <folly/ScopeGuard.h>
#include <folly/portability/GTest.h>
namespace {
* @author: Marcelo Juchem <marcelo@fb.com>
*/
-#include <folly/Memory.h>
#include <folly/Arena.h>
+#include <folly/Memory.h>
#include <folly/portability/GTest.h>
using namespace folly;
#include <folly/Conv.h>
#include <folly/Hash.h>
#include <folly/Memory.h>
-#include <folly/portability/SysMman.h>
#include <folly/portability/GTest.h>
+#include <folly/portability/SysMman.h>
using namespace std;
using namespace folly;
#include <folly/AtomicHashMap.h>
-#include <glog/logging.h>
-#include <thread>
#include <atomic>
#include <memory>
+#include <thread>
+
+#include <glog/logging.h>
#include <folly/Benchmark.h>
#include <folly/Conv.h>
*/
#include <folly/Baton.h>
-#include <folly/test/BatonTestHelpers.h>
-#include <folly/test/DeterministicSchedule.h>
-#include <folly/portability/GTest.h>
#include <thread>
+#include <folly/portability/GTest.h>
+#include <folly/test/BatonTestHelpers.h>
+#include <folly/test/DeterministicSchedule.h>
+
using namespace folly;
using namespace folly::test;
using folly::detail::EmulatedFutexAtomic;
#pragma once
#include <folly/Baton.h>
-#include <folly/test/DeterministicSchedule.h>
#include <folly/portability/GTest.h>
+#include <folly/test/DeterministicSchedule.h>
namespace folly {
namespace test {
#include <folly/Bits.h>
#include <algorithm>
-#include <type_traits>
#include <limits>
+#include <type_traits>
#include <vector>
#include <folly/Benchmark.h>
#include <folly/Checksum.h>
#include <boost/crc.hpp>
+
#include <folly/Benchmark.h>
#include <folly/Hash.h>
#include <folly/detail/ChecksumDetail.h>
#include <folly/ClockGettimeWrappers.h>
-#include <folly/test/TestUtils.h>
-#include <folly/portability/GTest.h>
-
#include <chrono>
+#include <folly/portability/GTest.h>
+#include <folly/test/TestUtils.h>
+
static constexpr auto kAcceptableDeltaSecs = std::chrono::seconds(120);
using folly::test::AreWithinSecs;
#include <atomic>
#include <memory>
#include <set>
-#include <vector>
-#include <thread>
#include <system_error>
+#include <thread>
+#include <vector>
#include <glog/logging.h>
#include <stdexcept>
-#include <folly/ExceptionWrapper.h>
#include <folly/Conv.h>
+#include <folly/ExceptionWrapper.h>
#include <folly/portability/GTest.h>
using namespace folly;
#include <folly/FBString.h>
#include <cstdlib>
-#include <list>
#include <fstream>
+#include <list>
#include <sstream>
#include <boost/random.hpp>
#include <atomic>
#include <cstdlib>
-
#include <iomanip>
#include <list>
#include <sstream>
+
#include <boost/algorithm/string.hpp>
#include <boost/random.hpp>
+#include <folly/Conv.h>
#include <folly/Foreach.h>
#include <folly/Portability.h>
#include <folly/Random.h>
-#include <folly/Conv.h>
#include <folly/portability/GTest.h>
using namespace std;
//
// Author: andrei.alexandrescu@fb.com
+#include <list>
+#include <memory>
+
+#include <boost/random.hpp>
+
#include <folly/Benchmark.h>
#include <folly/FBString.h>
#include <folly/FBVector.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
-#include <list>
-#include <memory>
-#include <boost/random.hpp>
-
using namespace std;
using namespace folly;
//
// Author: andrei.alexandrescu@fb.com
-#include <folly/Foreach.h>
-#include <folly/Traits.h>
-#include <folly/Random.h>
-#include <folly/FBString.h>
#include <folly/FBVector.h>
-#include <folly/portability/GTest.h>
#include <list>
#include <map>
#include <memory>
+
#include <boost/random.hpp>
+#include <folly/FBString.h>
+#include <folly/Foreach.h>
+#include <folly/Random.h>
+#include <folly/Traits.h>
+#include <folly/portability/GTest.h>
+
using namespace std;
using namespace folly;
#include <mutex>
-#include <glog/logging.h>
#include <boost/thread/locks.hpp>
+#include <glog/logging.h>
#include <folly/String.h>
#include <folly/Subprocess.h>
*/
#include <random>
+
#include <folly/Benchmark.h>
+#include <folly/Fingerprint.h>
#include <folly/Format.h>
#include <folly/detail/SlowFingerprint.h>
-#include <folly/Fingerprint.h>
using namespace std;
using namespace folly;
#include <glog/logging.h>
-#include <folly/detail/SlowFingerprint.h>
#include <folly/Benchmark.h>
+#include <folly/detail/SlowFingerprint.h>
#include <folly/portability/GTest.h>
using namespace folly;
#include <folly/Foreach.h>
-#include <folly/portability/GTest.h>
-
+#include <list>
#include <map>
#include <string>
#include <vector>
-#include <list>
+
+#include <folly/portability/GTest.h>
using namespace folly;
using namespace folly::detail;
#include <glog/logging.h>
-#include <folly/portability/Time.h>
#include <folly/portability/GTest.h>
+#include <folly/portability/Time.h>
using namespace folly::detail;
using namespace folly::test;
* limitations under the License.
*/
-#include <stdarg.h>
-#include <algorithm>
#include <folly/GroupVarint.h>
+#include <algorithm>
+#include <cstdarg>
+
// On platforms where it's not supported, GroupVarint will be compiled out.
#if HAVE_GROUP_VARINT
*/
#include <folly/Lazy.h>
-#include <map>
#include <functional>
#include <iostream>
+#include <map>
#include <folly/portability/GTest.h>
*/
#include <folly/Memory.h>
-#include <folly/Arena.h>
-#include <folly/String.h>
-#include <folly/portability/GTest.h>
-
-#include <glog/logging.h>
#include <type_traits>
#include <utility>
+#include <glog/logging.h>
+
+#include <folly/Arena.h>
+#include <folly/String.h>
+#include <folly/portability/GTest.h>
+
using namespace folly;
TEST(make_unique, compatible_with_std_make_unique) {
// @author: Bert Maher <bertrand@fb.com>
-#include <thread>
-#include <iostream>
-#include <stdio.h>
+#include <folly/ProducerConsumerQueue.h>
+
#include <pthread.h>
+#include <cstdio>
+#include <iostream>
+#include <thread>
+
+#include <glog/logging.h>
+
#include <folly/Benchmark.h>
-#include <folly/ProducerConsumerQueue.h>
#include <folly/portability/GFlags.h>
#include <folly/stats/Histogram.h>
#include <folly/stats/Histogram-defs.h>
-#include <glog/logging.h>
namespace {
#include <folly/RWSpinLock.h>
#include <stdlib.h>
-#include <vector>
#include <thread>
+#include <vector>
#include <glog/logging.h>
#include <folly/Random.h>
-#include <folly/Benchmark.h>
-#include <folly/Foreach.h>
+#include <random>
+#include <thread>
#include <glog/logging.h>
-#include <thread>
-#include <random>
+#include <folly/Benchmark.h>
+#include <folly/Foreach.h>
using namespace folly;
#include <folly/Random.h>
-#include <glog/logging.h>
-
#include <algorithm>
-#include <thread>
-#include <vector>
#include <random>
+#include <thread>
#include <unordered_set>
+#include <vector>
+
+#include <glog/logging.h>
#include <folly/portability/GTest.h>
*/
#include <folly/Range.h>
-#include <folly/Benchmark.h>
-#include <folly/Foreach.h>
+
#include <algorithm>
#include <iostream>
#include <random>
#include <string>
+#include <folly/Benchmark.h>
+#include <folly/Foreach.h>
+
using namespace folly;
using namespace std;
#include <folly/Range.h>
-#include <folly/portability/GTest.h>
-#include <folly/portability/Memory.h>
-#include <folly/portability/SysMman.h>
-
#include <array>
#include <iterator>
#include <limits>
#include <string>
#include <type_traits>
#include <vector>
-#include <boost/range/concepts.hpp>
+
#include <boost/algorithm/string/trim.hpp>
+#include <boost/range/concepts.hpp>
+
+#include <folly/portability/GTest.h>
+#include <folly/portability/Memory.h>
+#include <folly/portability/SysMman.h>
using namespace folly;
using namespace folly::detail;
#include <thread>
+#include <boost/thread/barrier.hpp>
+#include <glog/logging.h>
+
#include <folly/Singleton.h>
#include <folly/experimental/io/FsUtil.h>
#include <folly/io/async/EventBase.h>
#include <folly/Subprocess.h>
#endif
-#include <glog/logging.h>
-#include <boost/thread/barrier.hpp>
-
FOLLY_GCC_DISABLE_WARNING("-Wdeprecated-declarations")
using namespace folly;
#include <memory>
#include <vector>
-#include <folly/Singleton.h>
#include <folly/Benchmark.h>
-#include <folly/test/SingletonTestStructs.h>
+#include <folly/Singleton.h>
#include <folly/portability/GTest.h>
+#include <folly/test/SingletonTestStructs.h>
/*
* This test needs to be in its own file, as a standalone program.
#include <folly/SmallLocks.h>
-#include <folly/Random.h>
+#include <pthread.h>
#include <cassert>
+#include <condition_variable>
#include <cstdio>
#include <mutex>
-#include <condition_variable>
#include <string>
-#include <vector>
-#include <pthread.h>
-
#include <thread>
+#include <vector>
+#include <folly/Random.h>
#include <folly/portability/Asm.h>
#include <folly/portability/GTest.h>
#include <folly/portability/Unistd.h>
#endif
#include <folly/SpookyHashV1.h>
-#include <folly/portability/GTest.h>
-#include <folly/portability/Time.h>
#include <cinttypes>
-#include <cstdio>
#include <cstddef>
-#include <cstring>
+#include <cstdio>
#include <cstdlib>
+#include <cstring>
#include <glog/logging.h>
+#include <folly/portability/GTest.h>
+#include <folly/portability/Time.h>
+
using namespace ::folly::hash;
static bool failed = false;
#endif
#include <folly/SpookyHashV2.h>
-#include <folly/portability/GTest.h>
-#include <folly/portability/Time.h>
#include <cinttypes>
-#include <cstdio>
#include <cstddef>
-#include <cstring>
+#include <cstdio>
#include <cstdlib>
+#include <cstring>
#include <glog/logging.h>
+#include <folly/portability/GTest.h>
+#include <folly/portability/Time.h>
+
using namespace ::folly::hash;
static bool failed = false;
// will verify that the file actually gets created, which means that everything
// worked as intended.
-#include <sys/types.h>
#include <fcntl.h>
#include <signal.h>
+#include <sys/types.h>
#include <glog/logging.h>
#include <folly/SharedMutex.h>
#include <folly/SpinLock.h>
#include <folly/Synchronized.h>
-#include <folly/test/SynchronizedTestLib.h>
#include <folly/portability/GTest.h>
+#include <folly/test/SynchronizedTestLib.h>
using namespace folly::sync_tests;
*/
#include <folly/ThreadCachedArena.h>
-#include <folly/Memory.h>
+#include <algorithm>
+#include <iterator>
#include <map>
#include <mutex>
-#include <thread>
-#include <iterator>
-#include <algorithm>
#include <random>
+#include <thread>
#include <unordered_map>
#include <glog/logging.h>
-#include <folly/Range.h>
#include <folly/Benchmark.h>
+#include <folly/Memory.h>
+#include <folly/Range.h>
#include <folly/portability/GTest.h>
using namespace folly;
#include <array>
#include <atomic>
#include <chrono>
+#include <climits>
#include <condition_variable>
-#include <limits.h>
#include <map>
#include <mutex>
#include <set>
//#define USING_STD_VECTOR
+#include <climits>
+#include <cstddef>
+#include <exception>
+#include <iomanip>
#include <iostream>
-#include <sstream>
-#include <typeinfo>
-#include <type_traits>
#include <map>
#include <set>
-#include <string>
+#include <sstream>
#include <stdexcept>
-#include <exception>
-#include <climits>
-#include <cstddef>
-#include <iomanip>
+#include <string>
+#include <type_traits>
+#include <typeinfo>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/preprocessor.hpp>