Commit fe3cce9b authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

define FOLLY_CPLUSPLUS

Summary:
Define macro `FOLLY_CPLUSPLUS` on all platforms.

Move the initial C++ language version check below the `#include` group.

Reviewed By: Orvid

Differential Revision: D26420758

fbshipit-source-id: 33d156ae944e7112b007afc49e8fb929dc677b85
parent af1bcd17
......@@ -16,21 +16,23 @@
#pragma once
// MSCV 2017 __cplusplus definition by default does not track the C++ version.
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
#if !defined(_MSC_VER) || _MSC_VER >= 2000
static_assert(__cplusplus >= 201402L, "__cplusplus >= 201402L");
#include <cstddef>
#include <folly/CPortability.h>
#include <folly/portability/Config.h>
#if defined(_MSC_VER)
#define FOLLY_CPLUSPLUS _MSVC_LANG
#else
#define FOLLY_CPLUSPLUS __cplusplus
#endif
static_assert(FOLLY_CPLUSPLUS >= 201402L, "__cplusplus >= 201402L");
#if defined(__GNUC__) && !defined(__clang__)
static_assert(__GNUC__ >= 5, "__GNUC__ >= 5");
#endif
#include <cstddef>
#include <folly/CPortability.h>
#include <folly/portability/Config.h>
// Unaligned loads and stores
namespace folly {
#if FOLLY_HAVE_UNALIGNED_ACCESS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment