Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost/1.85.0 compile issues with msm::front::state_machine_def on llvm/clang++ 18.1.5 with std=c++20 #230

Closed
hoyhoy opened this issue May 4, 2024 · 4 comments

Comments

@hoyhoy
Copy link

hoyhoy commented May 4, 2024

We have some code that uses

struct front_msm : msm::front::state_machine_def<front_msm, visitable_state> {...}
struct visitable_state {}
typedef boost::msm::back::recursive_get_transition_table<front_msm>::type recursive_stt;

typedef boost::msm::back::recursive_get_transition_table<Sm_rund_front>::type recursive_stt;
typedef boost::msm::back::generate_state_set<recursive_stt>::type all_states;

This is erroring out with boost 1.85.0 on the latest clang. boost 1.84.0 compiles successfully though.

clang++ 18.1.5 errors out with this on the compile.

/include/boost/msm/back/args.hpp:60:45: error: 'no_args' does not refer to a value [Semantic Issue]
   60 | BOOST_PP_REPEAT(BOOST_MSM_VISITOR_ARG_SIZE, MSM_VISITOR_ARGS, ~)
      |                                             ^
/include/boost/preprocessor/repetition/repeat.hpp:30:26: note: expanded from macro 'BOOST_PP_REPEAT'
   30 | # define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
      |                          ^
/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
   22 | #    define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
      |                                ^
/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
   29 | #    define BOOST_PP_CAT_I(a, b) a ## b
      |                                  ^
<scratch space>:49:1: note: expanded from here
   49 | BOOST_PP_REPEAT_1
      | ^
/include/boost/msm/back/args.hpp:31:8: note: declared here
   31 | struct no_args {};
      |        ^
/include/boost/msm/back/args.hpp:60:45: error: use of undeclared identifier 'MSM_ARGS_PRINT' [Semantic Issue]
   60 | BOOST_PP_REPEAT(BOOST_MSM_VISITOR_ARG_SIZE, MSM_VISITOR_ARGS, ~)
      |                                             ^
/include/boost/preprocessor/repetition/repeat.hpp:30:26: note: expanded from macro 'BOOST_PP_REPEAT'
   30 | # define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
      |                          ^
/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
   22 | #    define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
      |                                ^
/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
   29 | #    define BOOST_PP_CAT_I(a, b) a ## b
      |                                  ^
<scratch space>:49:1: note: expanded from here
   49 | BOOST_PP_REPEAT_1
      | ^
@hoyhoy hoyhoy changed the title boost/1.85 compile issues with msm/back on clang18. boost/1.85.0 compile issues with msm::front::state_machine_def on llvm/clang++ 18.1.5 May 4, 2024
@hoyhoy hoyhoy changed the title boost/1.85.0 compile issues with msm::front::state_machine_def on llvm/clang++ 18.1.5 boost/1.85.0 compile issues with msm::front::state_machine_def on llvm/clang++ 18.1.5 with std=c++20 May 4, 2024
@hoyhoy
Copy link
Author

hoyhoy commented May 4, 2024

msvc 17.9.4 had problems with this code on boost 1.84.0 as well, but that seemed to get fixed at 17.9.6.
https://developercommunity.visualstudio.com/t/cl-193933523-x64-boost1840-boost/10622335

@Lastique
Copy link
Member

Lastique commented May 4, 2024

Please, report this to Boost.MSM.

@Lastique Lastique closed this as completed May 4, 2024
@hoyhoy
Copy link
Author

hoyhoy commented May 5, 2024

Seems like args.hpp is missing #include <boost/preprocessor/repetition/enum.hpp>

@hoyhoy
Copy link
Author

hoyhoy commented May 5, 2024

Even with the include our boost::msm::back::state_machine is now going into an infinite recursion and crashing. Worked in boost/1.84.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants