Skip to content

Commit

Permalink
Update C++ standard detection logic for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed May 3, 2020
1 parent 165c3a9 commit 0b93b5e
Show file tree
Hide file tree
Showing 21 changed files with 31 additions and 34 deletions.
5 changes: 2 additions & 3 deletions test/cpp_ctti_type_name_parser_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

// For more information, see http://www.boost.org

#include <boost/predef.h>
#include <boost/config.hpp>

#if (__cplusplus >= 201402L) || \
(BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14, 0, 0))
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include <boost/dll/config.hpp>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions test/cpp_import_class_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
// For more information, see http://www.boost.org


#include <boost/predef.h>
#include <boost/config.hpp>

#if (__cplusplus >= 201402L) || (BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14,0,0))
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include "../example/b2_workarounds.hpp"

Expand Down
4 changes: 2 additions & 2 deletions test/cpp_import_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

// For more information, see http://www.boost.org

#include <boost/predef.h>
#include <boost/config.hpp>

#if (__cplusplus >= 201402L) || (BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14,0,0))
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include "../example/b2_workarounds.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/cpp_load_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <boost/predef.h>

#if (__cplusplus >= 201103L) || (defined(_MSVC_LANG) && _MSVC_LANG < 201103L)
#if (__cplusplus >= 201103L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
// Make sure that it at least compiles
# include <boost/dll/smart_library.hpp>
#endif
Expand Down
2 changes: 1 addition & 1 deletion test/cpp_mangle_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <boost/predef.h>

#if (__cplusplus >= 201402L) || (BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14,0,0))
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include "../example/b2_workarounds.hpp"

Expand Down
6 changes: 3 additions & 3 deletions test/cpp_test_library.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright 2016 Klemens Morgenstern
// Copyright 2017-2019 Antony Polukhin
// Copyright 2017-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)

// For more information, see http://www.boost.org

#include <boost/predef.h>
#include <boost/config.hpp>

#if (__cplusplus >= 201402L) || (BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14,0,0))
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include <boost/dll/config.hpp>
#include <boost/variant.hpp>
Expand Down
6 changes: 2 additions & 4 deletions test/ctti_type_name_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

// For more information, see http://www.boost.org

#include <boost/predef.h>

#if (__cplusplus >= 201402L) || \
(BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14, 0, 0))
#include <boost/config.hpp>

#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
#include "../example/b2_workarounds.hpp"

#include <boost/core/lightweight_test.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/library_info_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2011-2012 Renato Tegon Forti
// Copyright 2015-2019 Antony Polukhin
// Copyright 2015-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
6 changes: 3 additions & 3 deletions test/link.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2019 Antony Polukhin
// Copyright 2018-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand All @@ -7,9 +7,9 @@
// For more information, see http://www.boost.org


#include <boost/predef.h>
#include <boost/config.hpp>

#if (__cplusplus >= 201402L) || (BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14,0,0))
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include <boost/dll/smart_library.hpp>
#include <boost/dll/import_mangled.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/link1.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2019 Antony Polukhin
// Copyright 2018-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/link2.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2019 Antony Polukhin
// Copyright 2018-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/section_name_too_big.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2011-2012 Renato Tegon Forti
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/shared_library_concurrent_load_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2019 Antony Polukhin
// Copyright 2015-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/shared_library_errors.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2011-2012 Renato Tegon Forti.
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/shared_library_get_symbol_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2011-2012 Renato Tegon Forti.
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/shared_library_load_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2011-2012 Renato Tegon Forti
// Copyright 2015-2019 Antony Polukhin
// Copyright 2015-2020 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/shared_library_search_symbol_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2011-2012 Renato Tegon Forti
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/structures_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
2 changes: 1 addition & 1 deletion test/symbol_runtime_info_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down
6 changes: 3 additions & 3 deletions test/template_method_linux_test.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright 2019 Ramil Gauss.
// Copyright 2019 Antony Polukhin.
// Copyright 2019-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <boost/predef.h>
#if (__cplusplus >= 201402L) || (BOOST_COMP_MSVC >= BOOST_VERSION_NUMBER(14,0,0))
#include <boost/config.hpp>
#if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)

#include <boost/dll/smart_library.hpp>
#include <boost/dll/import_mangled.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/test_library.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2011-2012 Renato Tegon Forti
// Copyright 2014 Renato Tegon Forti, Antony Polukhin.
// Copyright 2015-2019 Antony Polukhin.
// Copyright 2015-2020 Antony Polukhin.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
Expand Down

0 comments on commit 0b93b5e

Please sign in to comment.