FairRootGroup / FairMQ

C++ Message Queuing Library and Framework
GNU Lesser General Public License v3.0
87 stars 34 forks source link

Boost MSM (< 1.77?) broken in C++20 #437

Closed dennisklein closed 1 year ago

dennisklein commented 2 years ago

On Fedora 36's Boost 1.76 and FairMQ with -DCMAKE_CXX_STANDARD=20:

FAILED: fairmq/CMakeFiles/FairMQ.dir/StateMachine.cxx.o
/usr/lib64/ccache/c++ -DBOOST_ERROR_CODE_HEADER_ONLY -DFAIRMQ_HAS_STD_FILESYSTEM=1 -DFAIRMQ_HAS_STD_PMR=1 -DFMT_LOCALE -DFMT_SHARED -DFairMQ_EXPORTS -I/home/dklein/projects/FairMQ2/fairmq -I/home/dklein/projects/FairMQ2 -I/home/dklein/projects/FairMQ2/build -isystem /home/dklein/projects/FairMQ2/extern/PicoSHA2 -fdiagnostics-color=always -Og -g -Wshadow -Wall -Wextra -Wpedantic  -fPIC -std=c++20 -MD -MT fairmq/CMakeFiles/FairMQ.dir/StateMachine.cxx.o -MF fairmq/CMakeFiles/FairMQ.dir/StateMachine.cxx.o.d -o fairmq/CMakeFiles/FairMQ.dir/StateMachine.cxx.o -c /home/dklein/projects/FairMQ2/fairmq/StateMachine.cxx
In file included from /home/dklein/projects/FairMQ2/fairmq/StateMachine.cxx:19:
/usr/include/boost/msm/back/state_machine.hpp:1593:37: error: expected unqualified-id before ‘)’ token
 1593 |      state_machine<A0,A1,A2,A3,A4 >()
      |                                     ^
/usr/include/boost/msm/back/state_machine.hpp:1612:15: error: expected ‘)’ before ‘const’
 1612 |          (Expr const& expr,typename ::boost::enable_if<typename ::boost::proto::is_expr<Expr>::type >::type* =0)
      |          ~    ^~~~~~
      |               )
/usr/include/boost/msm/back/state_machine.hpp:1690:11: error: expected ‘)’ before ‘&&’ token
 1690 |     >(ARG0&& t0,ARG&&... t)
      |      ~    ^~
      |           )
/usr/include/boost/msm/back/state_machine.hpp:1707:11: error: expected ‘)’ before ‘const’
 1707 |     >(Expr const& expr,ARG&&... t)
      |      ~    ^~~~~~
      |           )
/usr/include/boost/msm/back/state_machine.hpp:1741:21: error: expected ‘)’ before ‘const’
 1741 |          (library_sm const& rhs)
      |          ~          ^~~~~~
      |                     )

seems to be resolved in Boost 1.77 (https://github.com/boostorg/msm/issues/38).

dennisklein commented 1 year ago

Seems resolved starting with Boost 1.77+ https://github.com/boostorg/msm/commit/a66047a989bd2d2671ac5b009e70f83e13220a94