Verified Commit 3eee09f6 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

macros: fix support of Windows compilers

parent 3f36837e
Pipeline #11545 passed with stage
in 112 minutes and 39 seconds
//
// Copyright (c) 2017-2019 CNRS INRIA
// Copyright (c) 2017-2020 CNRS INRIA
//
#ifndef __pinocchio_macros_hpp__
#define __pinocchio_macros_hpp__
#if __cplusplus >= 201103L
#define PINOCCHIO_WITH_CXX11_SUPPORT
// On Windows, __cplusplus is not necessarily set to the C++ version being used.
// See https://docs.microsoft.com/fr-fr/cpp/build/reference/zc-cplusplus?view=vs-2019 for further information.
#if __cplusplus >= 201703L
#define PINOCCHIO_WITH_CXX17_SUPPORT
#elif defined(_MSVC_LANG)
#if _MSVC_LANG >= 201703L
#define PINOCCHIO_WITH_CXX17_SUPPORT
#endif
#endif
#if __cplusplus >= 201403L
#define PINOCCHIO_WITH_CXX14_SUPPORT
#elif defined(_MSVC_LANG)
#if _MSVC_LANG >= 201403L
#define PINOCCHIO_WITH_CXX14_SUPPORT
#endif
#endif
#if __cplusplus >= 201703L
#define PINOCCHIO_WITH_CXX17_SUPPORT
#if __cplusplus >= 201103L
#define PINOCCHIO_WITH_CXX11_SUPPORT
#elif defined(_WIN32)
#ifdef PINOCCHIO_WITH_CXX14_SUPPORT
#define PINOCCHIO_WITH_CXX11_SUPPORT
#endif
#endif
#define PINOCCHIO_STRING_LITERAL(string) #string
......
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