Parameterized cpp Phase library with "Domain" type argument, so it can be specialized to the usage domain.