You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out it's quite easy to enable compile time support when implementing the builder pattern using concepts and boost::hana. Every add method can only be called exactly once - and the build method can only be called after all adders were called. And with a trick we can even avoid unnecessary memory operations at runtime. Hana also allows us to generate compile time error messages.
Keywords: builder pattern, boost::hana, concepts, metaprogramming, type based state machines