From c34cbb56ab45c3f82e6062b4d7d483bb9e0c8116 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 30 Apr 2025 12:32:02 +0200 Subject: [PATCH] Add MOCK_CXX_VERSION macro --- include/turtle/config.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/turtle/config.hpp b/include/turtle/config.hpp index 111d09d..8e42051 100644 --- a/include/turtle/config.hpp +++ b/include/turtle/config.hpp @@ -1,6 +1,7 @@ // http://turtle.sourceforge.net // // Copyright Mathieu Champlon 2009 +// Copyright 2020-2025 Alexander Grund // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -30,4 +31,17 @@ # endif #endif +#if BOOST_VERSION >= 107700 +# define MOCK_CXX_VERSION BOOST_CXX_VERSION +#elif defined(_MSC_VER) +# ifdef _MSVC_LANG +# define MOCK_CXX_VERSION _MSVC_LANG +# elif defined(_HAS_CXX17) +# define MOCK_CXX_VERSION 201703L +# endif +#endif +#ifndef MOCK_CXX_VERSION +# define MOCK_CXX_VERSION __cplusplus +#endif + #endif // MOCK_CONFIG_HPP_INCLUDED