arkitect
arkitect copied to clipboard
Permits to reuse the same that() for multiple should()
This fixes issue #303 where reusing the result of that() for multiple should() calls would cause duplicate violations due to shared mutable state in the RuleBuilder.
The fix makes should() and andThat() clone the RuleBuilder before adding constraints/specs, ensuring each rule branch gets an isolated copy of the builder state.
Added RuleBuilder::__clone() to deep clone Specs and Constraints objects.