Abstract Classes and constraints?

In reply to dave_59:

Thanks for the response. Extending the class to add the constraint wont work for a variety of reasons. 1. We often can’t (or don’t really know) the scope of where the class was defined in order to “extend” it. 2. More generally, as mentioned, I wish to contextualize constraint at an object level, not during any definition. I.e. on this (already constructed) obj - randomize with these constraints.

But I think you’re second response should work. I’ll work on extending my API in order to add constraint (modifier|methods). Your example is a great start. Things I’m thinking of, to me, would seem to tie the constraint solver in knots. I’m thinking of explicit function calls within the constraint block instead of just your simple address_list.size() call. The standard seems to imply that function calls are allowed here. I’ll just have to try some examples to see what works.

Thanks again.

Mark