boost-ext / sml

C++14 State Machine library
https://boost-ext.github.io/sml
Boost Software License 1.0
1.1k stars 173 forks source link

Allow move-only references as dependencies #582

Closed michaelcorreia-adt closed 1 year ago

michaelcorreia-adt commented 1 year ago

Problem: In my application, I have a move-only struct that I would like to insert as a dependency. I wanted to do this by reference, and not by pointer. I was getting a compiler error because it was not copy-constructible

Solution: Check that pool of T can use a copy-constructor before trying to use it. BTW, I tried running clang-format on this, and it changed some tests files I did not want to touch. I committed the changes it made in the dependencies test

Issue: #504 <- I'm not sure how exactly what this issue was trying to say, but I suspect it is the same issue

Reviewers: @krzysztof-jusiak