[#mp_units-utility-ConstraintPolicy]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/utility.adoc[utility]::ConstraintPolicy
:relfileprefix: ../../
:mrdocs:

Concept satisfied by error policy types usable with xref:mp_units/utility/constrained.adoc[`constrained`]&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;utility&sol;constrained&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename EP&gt;
concept ConstraintPolicy = requires(std&colon;&colon;string&lowbar;view msg) &lcub; EP&colon;&colon;on&lowbar;constraint&lowbar;violation(msg)&semi; &rcub;;
----

== Description

Requires a static `on&lowbar;constraint&lowbar;violation(std&colon;&colon;string&lowbar;view)` member that reports a domain constraint violation&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
