From 9fc46f5f08353691af77bd322fbc5587efd2b5a7 Mon Sep 17 00:00:00 2001 From: Kris Jusiak Date: Wed, 27 May 2020 10:20:15 -0600 Subject: [PATCH] :bug: [pph] Fix `sml.hpp` generation Problem: - `sml.hpp` generation using `tools/pph.sh` is out of date with `sml.hpp`. Solution: - Update files in sml/ folder to fix the generated `sml.hpp`. --- .github/workflows/pph-checker.yml | 16 ++++++--- .gitignore | 1 + include/boost/sml.hpp | 37 +++++++++------------ include/boost/sml/aux_/type_traits.hpp | 4 +-- include/boost/sml/aux_/utility.hpp | 6 ++-- include/boost/sml/back/policies.hpp | 2 +- include/boost/sml/back/state_machine.hpp | 6 ++-- include/boost/sml/front/actions/process.hpp | 2 +- include/boost/sml/front/state.hpp | 2 +- include/boost/sml/state_machine.hpp | 2 +- include/boost/sml/transition_table.hpp | 6 ++-- test/CMakeLists.txt | 1 - tools/pph.sh | 10 +++--- 13 files changed, 50 insertions(+), 45 deletions(-) diff --git a/.github/workflows/pph-checker.yml b/.github/workflows/pph-checker.yml index d31ad064..fefe3091 100644 --- a/.github/workflows/pph-checker.yml +++ b/.github/workflows/pph-checker.yml @@ -1,4 +1,4 @@ -name: Pph Checker +name: PPH checker on: push: @@ -8,9 +8,17 @@ on: jobs: build: - - runs-on: ubuntu-latest - + runs-on: ${{ matrix.os }} + strategy: + matrix: + name: [ + ubuntu-18.04-clang-4.0 + ] + include: + - name: ubuntu-18.04-clang-4.0 + os: ubuntu-18.04 + compiler: clang + version: "4.0" steps: - uses: actions/checkout@v2 - name: Run pph diff --git a/.gitignore b/.gitignore index f1d1be40..761a4a9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/build*/ /BUILD*/ /*.log *.out diff --git a/include/boost/sml.hpp b/include/boost/sml.hpp index 5a41e8e3..e998d86d 100644 --- a/include/boost/sml.hpp +++ b/include/boost/sml.hpp @@ -6,17 +6,14 @@ // #ifndef BOOST_SML_HPP #define BOOST_SML_HPP -#if defined(_MSC_VER) && !defined(__clang__) -#define COMPILING_WITH_MSVC -#endif #if (__cplusplus < 201305L && _MSC_VER < 1900) #error "[Boost].SML requires C++14 support (Clang-3.4+, GCC-5.1+, MSVC-2015+)" #else -#define BOOST_SML_VERSION 1'1'0 +#define BOOST_SML_VERSION 1'1'1 #define BOOST_SML_NAMESPACE_BEGIN \ namespace boost { \ namespace sml { \ - inline namespace v1_1_0 { + inline namespace v1_1_1 { #define BOOST_SML_NAMESPACE_END \ } \ } \ @@ -44,7 +41,7 @@ #define __BOOST_SML_TEMPLATE_KEYWORD template #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" -#elif defined(COMPILING_WITH_MSVC) +#elif defined(_MSC_VER) && !defined(__clang__) #define __BOOST_SML_DEFINED_HAS_BUILTIN #define __has_builtin(...) __has_builtin##__VA_ARGS__ #define __has_builtin__make_integer_seq(...) 1 @@ -52,7 +49,7 @@ #define __BOOST_SML_VT_INIT #define __BOOST_SML_ZERO_SIZE_ARRAY(...) #define __BOOST_SML_ZERO_SIZE_ARRAY_CREATE(...) __VA_ARGS__ ? __VA_ARGS__ : 1 -#if (defined(COMPILING_WITH_MSVC) && _MSC_VER >= 1910) // MSVC 2017 +#if defined(_MSC_VER) && !defined(__clang__) && _MSC_VER >= 1910 // MSVC 2017 #define __BOOST_SML_TEMPLATE_KEYWORD template #else #define __BOOST_SML_TEMPLATE_KEYWORD @@ -125,7 +122,7 @@ struct is_same : false_type {}; template struct is_same : true_type {}; template -#if defined(COMPILING_WITH_MSVC) +#if defined(_MSC_VER) && !defined(__clang__) struct is_base_of : integral_constant { }; #else @@ -136,7 +133,7 @@ decltype(T(declval()...), true_type{}) test_is_constructible(int); template false_type test_is_constructible(...); template -#if defined(COMPILING_WITH_MSVC) +#if defined(_MSC_VER) && !defined(__clang__) struct is_constructible : decltype(test_is_constructible(0)) { }; #else @@ -341,7 +338,7 @@ struct missing_ctor_parameter { operator U() { return {}; } -#if !defined(COMPILING_WITH_MSVC) +#if !defined(_MSC_VER) && !defined(__clang__) template ::value)> operator TMissing &() const { static_assert(missing_ctor_parameter::value, @@ -414,7 +411,7 @@ template