* limitations under the License.
*/
-#ifndef FOLLY_ARENA_H_
+#pragma once
#define FOLLY_ARENA_H_
#include <cassert>
} // namespace folly
#include <folly/Arena-inl.h>
-
-#endif /* FOLLY_ARENA_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_BASE_ASSUME_H_
-#define FOLLY_BASE_ASSUME_H_
+#pragma once
#include <folly/Portability.h>
#include <glog/logging.h>
}
} // namespace folly
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_ATOMICBITSET_H_
-#define FOLLY_ATOMICBITSET_H_
+#pragma once
#include <array>
#include <atomic>
}
} // namespaces
-
-#endif /* FOLLY_ATOMICBITSET_H_ */
* @author Jordan DeLong <delong.j@fb.com>
*/
-#ifndef FOLLY_ATOMICHASHARRAY_H_
+#pragma once
#define FOLLY_ATOMICHASHARRAY_H_
#include <atomic>
} // namespace folly
#include <folly/AtomicHashArray-inl.h>
-
-#endif // FOLLY_ATOMICHASHARRAY_H_
*
*/
-#ifndef FOLLY_ATOMICHASHMAP_H_
+#pragma once
#define FOLLY_ATOMICHASHMAP_H_
#include <boost/iterator/iterator_facade.hpp>
} // namespace folly
#include <folly/AtomicHashMap-inl.h>
-
-#endif // FOLLY_ATOMICHASHMAP_H_
* limitations under the License.
*/
-#ifndef FOLLY_ATOMIC_LINKED_LIST_H_
-#define FOLLY_ATOMIC_LINKED_LIST_H_
+#pragma once
#include <atomic>
#include <cassert>
};
} // namespace folly
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_ATOMIC_STRUCT_H_
-#define FOLLY_ATOMIC_STRUCT_H_
+#pragma once
#include <atomic>
#include <type_traits>
} // namespace detail
} // namespace folly
-
-#endif
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef FOLLY_ATOMICUNORDEREDMAP_H
-#define FOLLY_ATOMICUNORDEREDMAP_H
+
+#pragma once
#include <atomic>
#include <functional>
}
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_BATON_H
-#define FOLLY_BATON_H
+#pragma once
#include <stdint.h>
#include <atomic>
};
} // namespace folly
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_BENCHMARK_H_
-#define FOLLY_BENCHMARK_H_
+#pragma once
#include <folly/Portability.h>
#include <folly/Preprocessor.h> // for FB_ANONYMOUS_VARIABLE
if (auto FB_ANONYMOUS_VARIABLE(BENCHMARK_SUSPEND) = \
::folly::BenchmarkSuspender()) {} \
else
-
-#endif // FOLLY_BENCHMARK_H_
* @author Tudor Bosman (tudorb@fb.com)
*/
-#ifndef FOLLY_BITS_H_
-#define FOLLY_BITS_H_
+#pragma once
#if !defined(__clang__) && !(defined(_MSC_VER) && (_MSC_VER < 1900))
#define FOLLY_INTRINSIC_CONSTEXPR constexpr
}
} // namespace folly
-
-#endif /* FOLLY_BITS_H_ */
* limitations under the License.
*/
-#ifndef CPORTABILITY_H
-#define CPORTABILITY_H
+#pragma once
/* These definitions are in a separate file so that they
* may be included from C- as well as C++-based projects. */
#else
# define UBSAN_DISABLE(x)
#endif // UNDEFINED_SANITIZER
-
-#endif // CPORTABILITY_H
* limitations under the License.
*/
-#ifndef FOLLY_CHECKSUM_H_
-#define FOLLY_CHECKSUM_H_
+#pragma once
#include <stdint.h>
#include <cstddef>
uint32_t startingChecksum = ~0U);
} // folly
-
-#endif /* FOLLY_CHECKSUM_H_ */
// @author: Xin Liu <xliux@fb.com>
-#ifndef FOLLY_CONCURRENTSKIPLIST_INL_H_
-#define FOLLY_CONCURRENTSKIPLIST_INL_H_
+#pragma once
#include <algorithm>
#include <atomic>
};
}} // namespaces
-
-#endif // FOLLY_CONCURRENTSKIPLIST_INL_H_
}
*/
-#ifndef FOLLY_CONCURRENT_SKIP_LIST_H_
-#define FOLLY_CONCURRENT_SKIP_LIST_H_
+#pragma once
#include <algorithm>
#include <atomic>
};
} // namespace folly
-
-#endif // FOLLY_CONCURRENT_SKIP_LIST_H_
* limitations under the License.
*/
-#ifndef FOLLY_BASE_CONTAINER_TRAITS_H_
-#define FOLLY_BASE_CONTAINER_TRAITS_H_
+#pragma once
#include <folly/Traits.h>
}
}
-
-#endif
* @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
*/
-#ifndef FOLLY_BASE_CONV_H_
-#define FOLLY_BASE_CONV_H_
+#pragma once
#include <folly/FBString.h>
#include <folly/Likely.h>
#undef FOLLY_RANGE_CHECK_STRINGIZE
#undef FOLLY_RANGE_CHECK_STRINGIZE2
#endif
-
-#endif /* FOLLY_BASE_CONV_H_ */
* @author Dominik Gabi
*/
-#ifndef FOLLY_BASE_ATTRIBUTES_H_
-#define FOLLY_BASE_ATTRIBUTES_H_
+#pragma once
#ifndef __has_cpp_attribute
#define FOLLY_HAS_CPP_ATTRIBUTE(x) 0
#else
#define FOLLY_NULLABLE
#endif
-
-#endif /* FOLLY_BASE_ATTRIBUTES_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_CPUID_H_
-#define FOLLY_CPUID_H_
+#pragma once
#include <cstdint>
#include <folly/Portability.h>
};
} // namespace folly
-
-#endif /* FOLLY_CPUID_H_ */
* @author Tudor Bosman (tudorb@fb.com)
*/
-#ifndef FOLLY_DISCRIMINATEDPTR_H_
-#define FOLLY_DISCRIMINATEDPTR_H_
+#pragma once
#include <limits>
#include <stdexcept>
};
} // namespace folly
-
-#endif /* FOLLY_DISCRIMINATEDPTR_H_ */
// @author Nicholas Ormrod <njormrod@fb.com>
-#ifndef DYNAMIC_CONVERTER_H
-#define DYNAMIC_CONVERTER_H
+#pragma once
#include <folly/dynamic.h>
namespace folly {
}
} // namespace folly
-
-#endif // DYNAMIC_CONVERTER_H
* limitations under the License.
*/
-#ifndef FOLLY_EVICTINGHASHMAP_H_
-#define FOLLY_EVICTINGHASHMAP_H_
+#pragma once
#include <algorithm>
#include <exception>
};
} // folly
-
-#endif /* FOLLY_EVICTINGHASHMAP_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXCEPTION_H_
-#define FOLLY_EXCEPTION_H_
+#pragma once
#include <errno.h>
::folly::throwOnFail<E>((cond), "Check failed: " #cond)
} // namespace folly
-
-#endif /* FOLLY_EXCEPTION_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXCEPTIONWRAPPER_H
-#define FOLLY_EXCEPTIONWRAPPER_H
+#pragma once
#include <cassert>
#include <exception>
}
};
}
-#endif
// @author: Andrei Alexandrescu (aalexandre)
// String type.
-#ifndef FOLLY_BASE_FBSTRING_H_
-#define FOLLY_BASE_FBSTRING_H_
+#pragma once
#include <atomic>
#include <limits>
#undef NDEBUG
#undef FOLLY_DEFINED_NDEBUG_FOR_FBSTRING
#endif // FOLLY_DEFINED_NDEBUG_FOR_FBSTRING
-
-#endif // FOLLY_BASE_FBSTRING_H_
* optimizations for use with relocatable types and jemalloc.
*/
-#ifndef FOLLY_FBVECTOR_H
-#define FOLLY_FBVECTOR_H
+#pragma once
//=============================================================================
// headers
}
} // namespace folly
-
-#endif // FOLLY_FBVECTOR_H
* limitations under the License.
*/
-#ifndef FOLLY_FILE_H_
-#define FOLLY_FILE_H_
+#pragma once
#include <fcntl.h>
#include <sys/stat.h>
} // namespace folly
-
-#endif /* FOLLY_FILE_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_FILEUTIL_H_
-#define FOLLY_FILEUTIL_H_
+#pragma once
#include <folly/Conv.h>
#include <folly/Portability.h>
}
} // namespaces
-
-#endif /* FOLLY_FILEUTIL_H_ */
* @author Tudor Bosman (tudorb@facebook.com)
*/
-#ifndef FOLLY_FINGERPRINT_H_
-#define FOLLY_FINGERPRINT_H_
+#pragma once
#include <cstdint>
}
} // namespace folly
-
-#endif /* FOLLY_FINGERPRINT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_BASE_FOREACH_H_
-#define FOLLY_BASE_FOREACH_H_
+#pragma once
/*
* Iterim macros (until we have C++0x range-based for) that simplify
*/
#define FOR_EACH_RANGE_R(i, begin, end) \
for (auto i = (false ? (begin) : (end)); ::folly::detail::downTo(i, (begin));)
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_FORMAT_H_
+#pragma once
#define FOLLY_FORMAT_H_
#include <cstdio>
#include <folly/Format-inl.h>
#pragma GCC diagnostic pop
-
-#endif /* FOLLY_FORMAT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_FORMATARG_H_
-#define FOLLY_FORMATARG_H_
+#pragma once
#include <stdexcept>
#include <folly/Conv.h>
}
} // namespace folly
-
-#endif /* FOLLY_FORMATARG_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_FORMAT_TRAITS_H_
-#define FOLLY_FORMAT_TRAITS_H_
+#pragma once
#include <type_traits>
};
}} // namespaces
-
-#endif /* FOLLY_FORMAT_TRAITS_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_GROUPVARINT_H_
-#define FOLLY_GROUPVARINT_H_
+#pragma once
#if !defined(__GNUC__) && !defined(_MSC_VER)
#error GroupVarint.h requires GCC or MSVC
} // namespace folly
#endif /* FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 */
-#endif /* FOLLY_GROUPVARINT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_BASE_HASH_H_
-#define FOLLY_BASE_HASH_H_
+#pragma once
#include <cstdint>
#include <cstring>
}
};
} // namespace std
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_INDEXEDMEMPOOL_H
-#define FOLLY_INDEXEDMEMPOOL_H
+#pragma once
#include <type_traits>
#include <stdint.h>
} // namespace folly
# pragma GCC diagnostic pop
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_INTRUSIVELIST_H_
-#define FOLLY_INTRUSIVELIST_H_
+#pragma once
/*
* This file contains convenience aliases that make boost::intrusive::list
boost::intrusive::constant_time_size<true>>;
} // folly
-
-#endif // FOLLY_INTRUSIVELIST_H_
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef FOLLY_LAZY_H_
-#define FOLLY_LAZY_H_
+
+#pragma once
#include <utility>
#include <type_traits>
//////////////////////////////////////////////////////////////////////
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_LIFOSEM_H
-#define FOLLY_LIFOSEM_H
+#pragma once
#include <string.h>
#include <stdint.h>
};
} // namespace folly
-
-#endif
* @author Tudor Bosman (tudorb@fb.com)
*/
-#ifndef FOLLY_BASE_LIKELY_H_
-#define FOLLY_BASE_LIKELY_H_
+#pragma once
#undef LIKELY
#undef UNLIKELY
#define LIKELY(x) (x)
#define UNLIKELY(x) (x)
#endif
-
-#endif /* FOLLY_BASE_LIKELY_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_LOGGING_H_
-#define FOLLY_LOGGING_H_
+#pragma once
#include <atomic>
#include <chrono>
LOG(severity)
#endif
-
-#endif // FOLLY_LOGGING_H_
// Functions to provide smarter use of jemalloc, if jemalloc is being used.
// http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html
-#ifndef FOLLY_MALLOC_H_
+#pragma once
#define FOLLY_MALLOC_H_
/**
} // folly
#endif // !defined(_GLIBCXX_USE_FB) || defined(_LIBSTDCXX_FBSTRING)
-
-#endif // FOLLY_MALLOC_H_
* limitations under the License.
*/
-#ifndef FOLLY_MAPUTIL_H_
-#define FOLLY_MAPUTIL_H_
+#pragma once
#include <folly/Conv.h>
#include <folly/Optional.h>
}
} // namespace folly
-
-#endif /* FOLLY_MAPUTIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_MEMORY_H_
-#define FOLLY_MEMORY_H_
+#pragma once
#include <folly/Traits.h>
#include <folly/portability/Memory.h>
template <class T> struct IsArenaAllocator : std::false_type { };
} // namespace folly
-
-#endif /* FOLLY_MEMORY_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_MEMORYMAPPING_H_
-#define FOLLY_MEMORYMAPPING_H_
+#pragma once
#include <folly/FBString.h>
#include <folly/File.h>
void mmapFileCopy(const char* src, const char* dest, mode_t mode = 0666);
} // namespace folly
-
-#endif /* FOLLY_MEMORYMAPPING_H_ */
* from a.
*/
-#ifndef FOLLY_MERGE_H_
-#define FOLLY_MERGE_H_
+#pragma once
#include <algorithm>
}
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_OPTIONAL_H_
-#define FOLLY_OPTIONAL_H_
+#pragma once
/*
* Optional - For conditional initialization of values, like boost::optional,
///////////////////////////////////////////////////////////////////////////////
} // namespace folly
-
-#endif // FOLLY_OPTIONAL_H_
* limitations under the License.
*/
-#ifndef FOLLY_PACKEDSYNCPTR_H_
-#define FOLLY_PACKEDSYNCPTR_H_
+#pragma once
#include <folly/Portability.h>
"messed up");
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_PADDED_H_
-#define FOLLY_PADDED_H_
+#pragma once
#include <algorithm>
#include <cassert>
} // namespace padded
} // namespace folly
-
-#endif /* FOLLY_PADDED_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_PORTABILITY_H_
-#define FOLLY_PORTABILITY_H_
+#pragma once
#include <string.h>
// we will take the next one.
#define FOLLY_STATIC_CTOR_PRIORITY_MAX __attribute__((__init_priority__(102)))
#endif
-
-#endif // FOLLY_PORTABILITY_H_
// @author: Andrei Alexandrescu
-#ifndef FOLLY_PREPROCESSOR_
-#define FOLLY_PREPROCESSOR_
+#pragma once
/**
* Necessarily evil preprocessor-related amenities.
* another macro expansion.
*/
#define FB_STRINGIZE(x) #x
-
-#endif // FOLLY_PREPROCESSOR_
// @author Bo Hu (bhu@fb.com)
// @author Jordan DeLong (delong.j@fb.com)
-#ifndef PRODUCER_CONSUMER_QUEUE_H_
-#define PRODUCER_CONSUMER_QUEUE_H_
+#pragma once
#include <atomic>
#include <cassert>
};
}
-
-#endif
* @author Xin Liu <xliux@fb.com>
*/
-#ifndef FOLLY_RWSPINLOCK_H_
-#define FOLLY_RWSPINLOCK_H_
+#pragma once
/*
========================================================================
#ifdef RW_SPINLOCK_USE_X86_INTRINSIC_
#undef RW_SPINLOCK_USE_X86_INTRINSIC_
#endif
-
-#endif // FOLLY_RWSPINLOCK_H_
* limitations under the License.
*/
-#ifndef FOLLY_RANDOM_H_
+#pragma once
#define FOLLY_RANDOM_H_
#include <type_traits>
}
#include <folly/Random-inl.h>
-
-#endif
// @author Mark Rabkin (mrabkin@fb.com)
// @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
-#ifndef FOLLY_RANGE_H_
-#define FOLLY_RANGE_H_
+#pragma once
#include <folly/FBString.h>
#include <folly/Portability.h>
#pragma GCC diagnostic pop
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(folly::Range);
-
-#endif // FOLLY_RANGE_H_
* limitations under the License.
*/
-#ifndef FOLLY_SAFEASSERT_H_
-#define FOLLY_SAFEASSERT_H_
+#pragma once
#include <folly/Portability.h>
#include <folly/Preprocessor.h>
unsigned int line,
const char* function);
}} // namespace folly
-
-#endif /* FOLLY_SAFEASSERT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_SCOPEGUARD_H_
-#define FOLLY_SCOPEGUARD_H_
+#pragma once
#include <cstddef>
#include <functional>
auto FB_ANONYMOUS_VARIABLE(SCOPE_SUCCESS_STATE) \
= ::folly::detail::ScopeGuardOnSuccess() + [&]()
#endif // native uncaught_exception() supported
-
-#endif // FOLLY_SCOPEGUARD_H_
* limitations under the License.
*/
-#ifndef FOLLY_SMALLLOCKS_H_
-#define FOLLY_SMALLLOCKS_H_
+#pragma once
/*
* This header defines a few very small mutex types. These are useful
#if FOLLY_X64 || FOLLY_A64 || FOLLY_PPC64
#include <folly/PicoSpinLock.h>
#endif
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_FAST_BYTE_SET_H_
-#define FOLLY_FAST_BYTE_SET_H_
+#pragma once
#include <cstdint>
#include <glog/logging.h>
};
}
-
-#endif
// slower than MD5.
//
-#ifndef FOLLY_SPOOKYHASHV1_H_
-#define FOLLY_SPOOKYHASHV1_H_
+#pragma once
#include <cstddef>
#include <cstdint>
} // namespace hash
} // namespace folly
-
-#endif
// slower than MD5.
//
-#ifndef FOLLY_SPOOKYHASHV2_H_
-#define FOLLY_SPOOKYHASHV2_H_
+#pragma once
#include <cstddef>
#include <cstdint>
} // namespace hash
} // namespace folly
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_STRING_INL_H_
-#define FOLLY_STRING_INL_H_
+#pragma once
#include <stdexcept>
#include <iterator>
-#ifndef FOLLY_BASE_STRING_H_
+#ifndef FOLLY_STRING_H_
#error This file may only be included from String.h
#endif
}
} // namespace folly
-
-#endif /* FOLLY_STRING_INL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_BASE_STRING_H_
-#define FOLLY_BASE_STRING_H_
+#pragma once
+#define FOLLY_STRING_H_
#include <exception>
#include <stdarg.h>
} // namespace boost
#include <folly/String-inl.h>
-
-#endif
* make sure to serialize your signals (i.e. kill()) with the waits --
* either wait & signal from the same thread, or use a mutex.
*/
-#ifndef FOLLY_SUBPROCESS_H_
-#define FOLLY_SUBPROCESS_H_
+
+#pragma once
#include <sys/types.h>
#include <signal.h>
}
} // namespace folly
-
-#endif /* FOLLY_SUBPROCESS_H_ */
* @author: Andrei Alexandrescu (andrei.alexandrescu@fb.com)
*/
-#ifndef SYNCHRONIZED_H_
-#define SYNCHRONIZED_H_
+#pragma once
#include <type_traits>
#include <mutex>
else
} /* namespace folly */
-
-#endif // SYNCHRONIZED_H_
* limitations under the License.
*/
-#ifndef FOLLY_THREADCACHEDARENA_H_
-#define FOLLY_THREADCACHEDARENA_H_
+#pragma once
#include <type_traits>
struct IsArenaAllocator<ThreadCachedArena> : std::true_type { };
} // namespace folly
-
-#endif /* FOLLY_THREADCACHEDARENA_H_ */
* @author Spencer Ahrens (sahrens)
*/
-#ifndef FOLLY_THREADCACHEDINT_H
-#define FOLLY_THREADCACHEDINT_H
+#pragma once
#include <atomic>
};
}
-
-#endif
* @author Spencer Ahrens (sahrens)
*/
-#ifndef FOLLY_THREADLOCAL_H_
-#define FOLLY_THREADLOCAL_H_
+#pragma once
#include <folly/Portability.h>
#include <boost/iterator/iterator_facade.hpp>
};
} // namespace folly
-
-#endif /* FOLLY_THREADLOCAL_H_ */
* @author Tudor Bosman (tudorb@fb.com)
*/
-#ifndef FOLLY_TIMEOUTQUEUE_H_
-#define FOLLY_TIMEOUTQUEUE_H_
+#pragma once
#include <stdint.h>
#include <functional>
};
} // namespace folly
-
-#endif /* FOLLY_TIMEOUTQUEUE_H_ */
// @author: Andrei Alexandrescu
-#ifndef FOLLY_BASE_TRAITS_H_
-#define FOLLY_BASE_TRAITS_H_
+#pragma once
#include <memory>
#include <limits>
classname, func_name, /* nolint */ volatile); \
FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL( \
classname, func_name, /* nolint */ volatile const)
-
-#endif //FOLLY_BASE_TRAITS_H_
// Some utility routines relating to unicode.
-#ifndef FOLLY_UNICODE_H_
-#define FOLLY_UNICODE_H_
+#pragma once
#include <folly/FBString.h>
//////////////////////////////////////////////////////////////////////
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_URI_H_
+#pragma once
#define FOLLY_URI_H_
#include <folly/String.h>
} // namespace folly
#include <folly/Uri-inl.h>
-
-#endif /* FOLLY_URI_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_VARINT_H_
-#define FOLLY_VARINT_H_
+#pragma once
#include <type_traits>
#include <folly/Conv.h>
}
} // namespaces
-
-#endif /* FOLLY_VARINT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_VERSIONCHECK_H_
-#define FOLLY_VERSIONCHECK_H_
+#pragma once
#include <cstdio>
#include <cstdlib>
} \
} \
}
-
-#endif /* FOLLY_VERSIONCHECK_H_ */
* limitations under the License.
*/
-#ifndef incl_FOLLY_ATOMIC_HASH_UTILS_H
-#define incl_FOLLY_ATOMIC_HASH_UTILS_H
+#pragma once
#include <thread>
#include <folly/portability/Asm.h>
}
}} // namespace folly::detail
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_BITITERATORDETAIL_H_
-#define FOLLY_DETAIL_BITITERATORDETAIL_H_
+#pragma once
#include <iterator>
#include <type_traits>
} // namespace bititerator_detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_BITITERATORDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_BITSDETAIL_H_
-#define FOLLY_DETAIL_BITSDETAIL_H_
+#pragma once
namespace folly {
namespace detail {
} // namespace detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_BITSDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_CACHELOCALITY_H_
-#define FOLLY_DETAIL_CACHELOCALITY_H_
+#pragma once
#include <sched.h>
#include <algorithm>
} // namespace detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_CacheLocality_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_CHECKSUMDETAIL_H_
-#define FOLLY_DETAIL_CHECKSUMDETAIL_H_
+#pragma once
namespace folly { namespace detail {
}} // folly::detail
-
-#endif /* FOLLY_DETAIL_CHECKSUMDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_DISCRIMINATEDPTRDETAIL_H_
-#define FOLLY_DETAIL_DISCRIMINATEDPTRDETAIL_H_
+#pragma once
#include <utility>
#include <type_traits>
} // namespace dptr_detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_DISCRIMINATEDPTRDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_EXCEPTIONWRAPPER_H
-#define FOLLY_DETAIL_EXCEPTIONWRAPPER_H
+#pragma once
namespace folly { namespace detail {
};
}}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_FILEUTILDETAIL_H_
-#define FOLLY_DETAIL_FILEUTILDETAIL_H_
+#pragma once
#include <cerrno>
#include <unistd.h>
}
}} // namespaces
-
-#endif /* FOLLY_DETAIL_FILEUTILDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_BUILD_FINGERPRINTPOLYNOMIAL_H_
-#define FOLLY_BUILD_FINGERPRINTPOLYNOMIAL_H_
+#pragma once
#include <cstdint>
} // namespace detail
} // namespace folly
-
-#endif /* FOLLY_BUILD_FINGERPRINTPOLYNOMIAL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_FUNCTIONAL_EXCEPT_H
-#define FOLLY_DETAIL_FUNCTIONAL_EXCEPT_H
+#pragma once
#include <folly/Portability.h>
#else
#error This file should never be included if FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set
#endif
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_GROUPVARINTDETAIL_H_
-#define FOLLY_DETAIL_GROUPVARINTDETAIL_H_
+#pragma once
#include <stddef.h>
} // namespace detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_GROUPVARINTDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_MALLOC_H
-#define FOLLY_DETAIL_MALLOC_H
+#pragma once
#include <stdlib.h>
#endif
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_MEMORYIDLER_H
-#define FOLLY_DETAIL_MEMORYIDLER_H
+#pragma once
#include <atomic>
#include <chrono>
};
}} // namespace folly::detail
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_RANGE_COMMON_H_
-#define FOLLY_DETAIL_RANGE_COMMON_H_
+#pragma once
#include <algorithm>
#include <string>
}
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_RANGE_SSE42_H_
-#define FOLLY_DETAIL_RANGE_SSE42_H_
+#pragma once
#include <cstddef>
#include <folly/detail/RangeCommon.h>
}
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_SLOWFINGERPRINT_H_
-#define FOLLY_DETAIL_SLOWFINGERPRINT_H_
+#pragma once
#include <folly/Fingerprint.h>
#include <folly/detail/FingerprintPolynomial.h>
} // namespace detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_SLOWFINGERPRINT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_STATS_H_
-#define FOLLY_DETAIL_STATS_H_
+#pragma once
#include <chrono>
#include <cstdint>
};
}} // folly::detail
-
-#endif // FOLLY_DETAIL_STATS_H_
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_THREADLOCALDETAIL_H_
-#define FOLLY_DETAIL_THREADLOCALDETAIL_H_
+#pragma once
#include <limits.h>
#include <pthread.h>
} // namespace threadlocal_detail
} // namespace folly
-
-#endif /* FOLLY_DETAIL_THREADLOCALDETAIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DETAIL_UNCAUGHTEXCEPTIONCOUNTER_H_
-#define FOLLY_DETAIL_UNCAUGHTEXCEPTIONCOUNTER_H_
+#pragma once
#include <exception>
}
}} // namespaces
-
-#endif /* FOLLY_DETAIL_UNCAUGHTEXCEPTIONCOUNTER_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_DYNAMIC_INL_H_
-#define FOLLY_DYNAMIC_INL_H_
+#pragma once
#include <functional>
#include <boost/iterator/iterator_adaptor.hpp>
} // namespaces
#undef FB_DYNAMIC_APPLY
-
-#endif
* @author Jordan DeLong <delong.j@fb.com>
*/
-#ifndef FOLLY_DYNAMIC_H_
-#define FOLLY_DYNAMIC_H_
+#pragma once
#include <cstdint>
#include <initializer_list>
}
#include <folly/dynamic-inl.h>
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_BIT_VECTOR_CODING_H
-#define FOLLY_EXPERIMENTAL_BIT_VECTOR_CODING_H
+#pragma once
#include <cstdlib>
#include <limits>
};
}} // namespaces
-
-#endif // FOLLY_EXPERIMENTAL_BIT_VECTOR_CODING_H
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_BITS_H_
-#define FOLLY_EXPERIMENTAL_BITS_H_
+#pragma once
#include <cstddef>
#include <type_traits>
}
} // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_BITS_H_ */
* "Quasi-succinct indices" (arxiv:1206.4300).
*/
-#ifndef FOLLY_EXPERIMENTAL_ELIAS_FANO_CODING_H
-#define FOLLY_EXPERIMENTAL_ELIAS_FANO_CODING_H
+#pragma once
#include <cstdlib>
#include <limits>
};
}} // namespaces
-
-#endif // FOLLY_EXPERIMENTAL_ELIAS_FANO_CODING_H
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_EVENTCOUNT_H_
-#define FOLLY_EXPERIMENTAL_EVENTCOUNT_H_
+#pragma once
#include <unistd.h>
#include <syscall.h>
}
} // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_EVENTCOUNT_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_FUNCTION_SCHEDULER_H_
-#define FOLLY_EXPERIMENTAL_FUNCTION_SCHEDULER_H_
+#pragma once
#include <folly/Range.h>
#include <chrono>
};
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_INSTRUCTIONS_H
-#define FOLLY_EXPERIMENTAL_INSTRUCTIONS_H
+#pragma once
#include <glog/logging.h>
};
}}} // namespaces
-
-#endif // FOLLY_EXPERIMENTAL_INSTRUCTIONS_H
* limitations under the License.
*/
-#ifndef FOLLY_NESTEDCOMMANDLINEAPP_H_
-#define FOLLY_NESTEDCOMMANDLINEAPP_H_
+#pragma once
#include <functional>
#include <stdexcept>
};
} // namespaces
-
-#endif /* FOLLY_NESTEDCOMMANDLINEAPP_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_PROGRAMOPTIONS_H_
-#define FOLLY_PROGRAMOPTIONS_H_
+#pragma once
#include <boost/program_options.hpp>
#include <folly/Optional.h>
const boost::program_options::options_description& desc);
} // namespaces
-
-#endif /* FOLLY_PROGRAMOPTIONS_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_SELECT64_H
-#define FOLLY_EXPERIMENTAL_SELECT64_H
+#pragma once
#include <glog/logging.h>
}
} // namespace folly
-
-#endif
// Copyright 2013-present Facebook. All Rights Reserved.
// @author: Pavlo Kushnir (pavlo)
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDCOMMON_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDCOMMON_H_
+#pragma once
#include <memory>
#include <folly/Range.h>
}
} // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDCOMMON_H_ */
// Copyright 2013-present Facebook. All Rights Reserved.
// @author: Pavlo Kushnir (pavlo)
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDMAP_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDMAP_H_
+#pragma once
#include <initializer_list>
#include <memory>
};
} // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDMAP_H_ */
// Copyright 2013-present Facebook. All Rights Reserved.
// @author: Pavlo Kushnir (pavlo)
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDSET_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDSET_H_
+#pragma once
#include <initializer_list>
#include <memory>
using StringKeyedSet = StringKeyedSetBase<>;
} // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDSET_H_ */
// Copyright 2013-present Facebook. All Rights Reserved.
// @author: Pavlo Kushnir (pavlo)
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDMAP_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDMAP_H_
+#pragma once
#include <initializer_list>
#include <memory>
};
} // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDMAP_H_ */
// Copyright 2013-present Facebook. All Rights Reserved.
// @author: Pavlo Kushnir (pavlo)
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDSET_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDSET_H_
+#pragma once
#include <initializer_list>
#include <memory>
typedef BasicStringKeyedUnorderedSet<> StringKeyedUnorderedSet;
} // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDSET_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_TESTUTIL_H_
-#define FOLLY_TESTUTIL_H_
+#pragma once
#include <map>
#include <string>
} // namespace test
} // namespace folly
-
-#endif /* FOLLY_TESTUTIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_TUPLEOPS_H_
-#define FOLLY_TUPLEOPS_H_
+#pragma once
#include <limits>
#include <tuple>
}
} // namespaces
-
-#endif /* FOLLY_TUPLEOPS_H_ */
* limitations under the License.
*/
-
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_
+#pragma once
// A clone of the relevant parts of unwind-cxx.h from libstdc++
// The layout of these structures is defined by the ABI.
}
} // namespace __cxxabiv1
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_ */
//
// Exception tracer library.
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_
+#pragma once
#include <cstdint>
#include <iosfwd>
} // namespace exception_tracer
} // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACERLIB_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACERLIB_H_
+#pragma once
#include <typeinfo>
#include <exception>
void registerRethrowExceptionCallback(RethrowExceptionType callback);
}
}
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACERLIB_H_ */
* limitations under the License.
*/
-
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_STACKTRACE_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_STACKTRACE_H_
+#pragma once
#include <cassert>
#include <cstddef>
};
}} // namespaces
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_STACKTRACE_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_IO_ASYNCIO_H_
-#define FOLLY_IO_ASYNCIO_H_
+#pragma once
#include <sys/types.h>
#include <sys/uio.h>
};
} // namespace folly
-
-#endif /* FOLLY_IO_ASYNCIO_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_IO_FSUTIL_H_
-#define FOLLY_IO_FSUTIL_H_
+#pragma once
#include <boost/filesystem.hpp>
} // namespace fs
} // namespace folly
-
-#endif /* FOLLY_IO_FSUTIL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_IO_HUGEPAGES_H_
-#define FOLLY_IO_HUGEPAGES_H_
+#pragma once
#include <sys/stat.h>
#include <sys/types.h>
const HugePageSize* getHugePageSizeForDevice(dev_t device);
} // namespace folly
-
-#endif /* FOLLY_IO_HUGEPAGES_H_ */
// DWARF record parser
-#ifndef FOLLY_EXPERIMENTAL_SYMBOLIZER_DWARF_H_
-#define FOLLY_EXPERIMENTAL_SYMBOLIZER_DWARF_H_
+#pragma once
#include <boost/variant.hpp>
} // namespace symbolizer
} // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_SYMBOLIZER_DWARF_H_ */
// ELF file parser
-#ifndef FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_
+#pragma once
#define FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_
#include <stdio.h>
} // namespace folly
#include <folly/experimental/symbolizer/Elf-inl.h>
-
-#endif /* FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_SYMBOLIZER_ELFCACHE_H_
-#define FOLLY_SYMBOLIZER_ELFCACHE_H_
+#pragma once
#include <cstring>
#include <limits.h> // for PATH_MAX
};
}} // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_ELFCACHE_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_SYMBOLIZER_LINEREADER_H_
-#define FOLLY_SYMBOLIZER_LINEREADER_H_
+#pragma once
#include <cstddef>
};
}} // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_LINEREADER_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_SYMBOLIZER_SIGNALHANDLER_H_
-#define FOLLY_SYMBOLIZER_SIGNALHANDLER_H_
+#pragma once
#include <functional>
}} // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_SIGNALHANDLER_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_SYMBOLIZER_STACKTRACE_H_
-#define FOLLY_SYMBOLIZER_STACKTRACE_H_
+#pragma once
#include <cstdint>
#include <cstdlib>
ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses);
}} // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_STACKTRACE_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_SYMBOLIZER_SYMBOLIZER_H_
-#define FOLLY_EXPERIMENTAL_SYMBOLIZER_SYMBOLIZER_H_
+#pragma once
#include <array>
#include <cstdint>
} // namespace symbolizer
} // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_SYMBOLIZER_SYMBOLIZER_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_SYMBOLIZER_TEST_SIGNALHANDLERTEST_H_
-#define FOLLY_SYMBOLIZER_TEST_SIGNALHANDLERTEST_H_
+#pragma once
namespace folly { namespace symbolizer { namespace test {
}
}}} // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_TEST_SIGNALHANDLERTEST_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_EXPERIMENTAL_CODING_TEST_UTILS_H
-#define FOLLY_EXPERIMENTAL_CODING_TEST_UTILS_H
+#pragma once
#include <algorithm>
#include <fstream>
}
}} // namespaces
-
-#endif // FOLLY_EXPERIMENTAL_CODING_TEST_UTILS_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_BASE_H
+#ifndef FOLLY_GEN_BASE_H_
#error This file may only be included from folly/gen/Base.h
#endif
* limitations under the License.
*/
-#ifndef FOLLY_GEN_BASE_H
-#define FOLLY_GEN_BASE_H
+#pragma once
+#define FOLLY_GEN_BASE_H_
#include <algorithm>
#include <functional>
}} // folly::gen
#include <folly/gen/Base-inl.h>
-
-#endif // FOLLY_GEN_BASE_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_COMBINE_H
+#ifndef FOLLY_GEN_COMBINE_H_
#error This file may only be included from folly/gen/Combine.h
#endif
* limitations under the License.
*/
-#ifndef FOLLY_GEN_COMBINE_H
-#define FOLLY_GEN_COMBINE_H
+#pragma once
+#define FOLLY_GEN_COMBINE_H_
#include <folly/gen/Base.h>
} // namespace folly
#include <folly/gen/Combine-inl.h>
-
-#endif // FOLLY_GEN_COMBINE_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_CORE_H
+#ifndef FOLLY_GEN_CORE_H_
#error This file may only be included from folly/gen/Core.h
#endif
* limitations under the License.
*/
-#ifndef FOLLY_GEN_CORE_H
-#define FOLLY_GEN_CORE_H
+#pragma once
+#define FOLLY_GEN_CORE_H_
namespace folly { namespace gen {
}} // folly::gen
#include <folly/gen/Core-inl.h>
-
-#endif // FOLLY_GEN_CORE_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_FILE_H
+#ifndef FOLLY_GEN_FILE_H_
#error This file may only be included from folly/gen/File.h
#endif
* limitations under the License.
*/
-#ifndef FOLLY_GEN_FILE_H
-#define FOLLY_GEN_FILE_H
+#pragma once
+#define FOLLY_GEN_FILE_H_
#include <folly/File.h>
#include <folly/gen/Base.h>
}} // !folly::gen
#include <folly/gen/File-inl.h>
-
-#endif // FOLLY_GEN_FILE_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_PARALLEL_H_
+#pragma once
#define FOLLY_GEN_PARALLEL_H_
#include <mutex>
}} // !namespace folly::gen
#include <folly/gen/Parallel-inl.h>
-
-#endif /* FOLLY_GEN_PARALLEL_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_GEN_PARALLELMAP_H
+#ifndef FOLLY_GEN_PARALLELMAP_H_
#error This file may only be included from folly/gen/ParallelMap.h
#endif
* limitations under the License.
*/
-#ifndef FOLLY_GEN_PARALLELMAP_H
-#define FOLLY_GEN_PARALLELMAP_H
+#pragma once
+#define FOLLY_GEN_PARALLELMAP_H_
#include <folly/gen/Core.h>
}} // namespaces
#include <folly/gen/ParallelMap-inl.h>
-
-#endif // FOLLY_GEN_PARALLELMAP_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_STRING_H
+#ifndef FOLLY_GEN_STRING_H_
#error This file may only be included from folly/gen/String.h
#endif
* limitations under the License.
*/
-#ifndef FOLLY_GEN_STRING_H
-#define FOLLY_GEN_STRING_H
+#pragma once
+#define FOLLY_GEN_STRING_H_
#include <folly/Range.h>
#include <folly/gen/Base.h>
} // namespace folly
#include <folly/gen/String-inl.h>
-
-#endif // FOLLY_GEN_STRING_H
* limitations under the License.
*/
-#ifndef FOLLY_GEN_BENCH_H_
-#define FOLLY_GEN_BENCH_H_
+#pragma once
#include <folly/Benchmark.h>
}), true)
#define BENCH_GEN(gen) BENCH_GEN_IMPL(gen, "")
#define BENCH_GEN_REL(gen) BENCH_GEN_IMPL(gen, "%")
-
-#endif
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef INIT_LIGHT_BASE_H
-#define INIT_LIGHT_BASE_H
+
+#pragma once
/*
* Calls common init functions in the necessary order
void init(int* argc, char*** argv, bool removeFlags = true);
} // folly
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_IO_COMPRESSION_H_
-#define FOLLY_IO_COMPRESSION_H_
+#pragma once
#include <cstdint>
#include <limits>
int level = COMPRESSION_LEVEL_DEFAULT);
}} // namespaces
-
-#endif /* FOLLY_IO_COMPRESSION_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_CURSOR_H
-#define FOLLY_CURSOR_H
+#pragma once
#include <assert.h>
#include <cstdarg>
};
}} // folly::io
-
-#endif // FOLLY_CURSOR_H
* limitations under the License.
*/
-#ifndef FOLLY_IO_IOBUF_H_
-#define FOLLY_IO_IOBUF_H_
+#pragma once
#include <glog/logging.h>
#include <atomic>
} // folly
#pragma GCC diagnostic pop
-
-#endif // FOLLY_IO_IOBUF_H_
* limitations under the License.
*/
-#ifndef FOLLY_IO_IOBUF_QUEUE_H
-#define FOLLY_IO_IOBUF_QUEUE_H
+#pragma once
#include <folly/io/IOBuf.h>
};
} // folly
-
-#endif // FOLLY_IO_IOBUF_QUEUE_H
* or deleted chunks of the file, or modified data. When reading, you may lose
* corrupted records, but the stream will resynchronize automatically.
*/
-#ifndef FOLLY_IO_RECORDIO_H_
+
+#pragma once
#define FOLLY_IO_RECORDIO_H_
#include <atomic>
} // namespaces
#include <folly/io/RecordIO-inl.h>
-
-#endif /* FOLLY_IO_RECORDIO_H_ */
* limitations under the License.
*/
-#ifndef FOLLY_IO_TYPEDIOBUF_H_
-#define FOLLY_IO_TYPEDIOBUF_H_
+#pragma once
#include <algorithm>
#include <iterator>
};
} // namespace folly
-
-#endif /* FOLLY_IO_TYPEDIOBUF_H_ */
* @author Jordan DeLong <delong.j@fb.com>
*/
-#ifndef FOLLY_JSON_H_
-#define FOLLY_JSON_H_
+#pragma once
#include <iosfwd>
//////////////////////////////////////////////////////////////////////
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_CONSTEXPR_H_
-#define FOLLY_CONSTEXPR_H_
+#pragma once
#include <cstdint>
#include <cstring>
#endif
}
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_GFLAGS_H_
-#define FOLLY_GFLAGS_H_
+#pragma once
#include <folly/Portability.h>
#else
#define DEFINE_int32(_name, _default, _description) int FLAGS_##_name = _default
#endif
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_SYSUIO_H_
-#define FOLLY_SYSUIO_H_
+#pragma once
#include <sys/uio.h>
constexpr size_t kIovMax = UIO_MAXIOV;
#endif
}
-
-#endif
*
* @author Jordan DeLong <delong.j@fb.com>
*/
-#ifndef FOLLY_SMALL_VECTOR_H_
-#define FOLLY_SMALL_VECTOR_H_
+
+#pragma once
#include <stdexcept>
#include <cstdlib>
# undef FB_PACK_PUSH
# undef FB_PACK_POP
#endif
-
-#endif
* std::vector<>, which requires it to be Assignable.)
*/
-#ifndef FOLLY_SORTED_VECTOR_TYPES_H_
-#define FOLLY_SORTED_VECTOR_TYPES_H_
+#pragma once
#include <algorithm>
#include <initializer_list>
//////////////////////////////////////////////////////////////////////
}
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_STATS_BUCKETEDTIMESERIES_INL_H_
-#define FOLLY_STATS_BUCKETEDTIMESERIES_INL_H_
+#pragma once
#include <algorithm>
#include <glog/logging.h>
}
} // folly
-
-#endif // FOLLY_STATS_BUCKETEDTIMESERIES_INL_H_
* limitations under the License.
*/
-#ifndef FOLLY_STATS_BUCKETEDTIMESERIES_H_
-#define FOLLY_STATS_BUCKETEDTIMESERIES_H_
+#pragma once
#include <chrono>
#include <vector>
};
} // folly
-
-#endif // FOLLY_STATS_BUCKETEDTIMESERIES_H_
* limitations under the License.
*/
-#ifndef FOLLY_HISTOGRAM_DEFS_H_
-#define FOLLY_HISTOGRAM_DEFS_H_
+#pragma once
#include <folly/Conv.h>
}
} // folly
-
-#endif // FOLLY_HISTOGRAM_DEFS_H_
* limitations under the License.
*/
-#ifndef FOLLY_HISTOGRAM_H_
-#define FOLLY_HISTOGRAM_H_
+#pragma once
#include <cstddef>
#include <limits>
};
} // folly
-
-#endif // FOLLY_HISTOGRAM_H_
* limitations under the License.
*/
-#ifndef FOLLY_STATS_MULTILEVELTIMESERIES_DEFS_H_
-#define FOLLY_STATS_MULTILEVELTIMESERIES_DEFS_H_
+#pragma once
#include <glog/logging.h>
}
} // folly
-
-#endif // FOLLY_STATS_MULTILEVELTIMESERIES_DEFS_H_
* limitations under the License.
*/
-#ifndef FOLLY_STATS_MULTILEVELTIMESERIES_H_
-#define FOLLY_STATS_MULTILEVELTIMESERIES_H_
+#pragma once
#include <chrono>
#include <string>
};
} // folly
-
-#endif // FOLLY_STATS_MULTILEVELTIMESERIES_H_
* limitations under the License.
*/
-#ifndef FOLLY_TIMESERIES_HISTOGRAM_DEF_H_
-#define FOLLY_TIMESERIES_HISTOGRAM_DEF_H_
+#pragma once
#include <folly/Conv.h>
#include <folly/stats/Histogram-defs.h>
}
} // namespace folly
-
-#endif
* limitations under the License.
*/
-#ifndef FOLLY_TIMESERIES_HISTOGRAM_H_
-#define FOLLY_TIMESERIES_HISTOGRAM_H_
+#pragma once
#include <string>
#include <boost/static_assert.hpp>
};
} // folly
-
-#endif // FOLLY_TIMESERIES_HISTOGRAM_H_
* limitations under the License.
*/
-#ifndef FOLLY_TEST_SYNCHRONIZEDTESTLIB_INL_H
-#define FOLLY_TEST_SYNCHRONIZEDTESTLIB_INL_H
+#pragma once
#include <gtest/gtest.h>
folly::construct_in_place, 5, "a"
);
}
-
-
-#endif /* FOLLY_TEST_SYNCHRONIZEDTESTLIB_INL_H */
* limitations under the License.
*/
-#ifndef FOLLY_TEST_SYNCHRONIZEDTESTLIB_H
-#define FOLLY_TEST_SYNCHRONIZEDTESTLIB_H
+#pragma once
// We have mutex types outside of folly that we want to test with Synchronized.
// Make it easy for mutex implementators to test their classes with
template <class Mutex> void testInPlaceConstruction();
#include <folly/test/SynchronizedTestLib-inl.h>
-
-#endif /* FOLLY_TEST_SYNCHRONIZEDTESTLIB_H */
* limitations under the License.
*/
-#ifndef FOLLY_TESTUTILS_H
-#define FOLLY_TESTUTILS_H
+#pragma once
#include <gtest/gtest.h>
// a normal test failure; there is only an effect if the test framework
// interprets the message.
#define SKIP() GTEST_FATAL_FAILURE_("Test skipped by client")
-
-#endif // FOLLY_TESTUTILS_H
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef BENCHMARK_IMPL_H_
-#define BENCHMARK_IMPL_H_
+
+#pragma once
#include <functional>
fn();
}
}
-
-#endif // BENCHMARK_IMPL_H_
* limitations under the License.
*/
-#ifndef TEST_FUNCTIONS_H_
-#define TEST_FUNCTIONS_H_
+#pragma once
#include <exception>
#include <functional>
// Avoid small object optimization.
char data[1024];
};
-
-#endif // TEST_FUNCTIONS_H_