Write public API functions in terms of unrestricted templates. Use static_assert() to perform validity checks on them and give useful feedback to the user. Forward the call to private member functions that expect concepts instead of unrestricted templates.
This way we provide useful error messages to the user but still make our concepts the ultimate arbitror of truth in case our static asserts contain gaps.
Write public API functions in terms of unrestricted templates. Use
static_assert()
to perform validity checks on them and give useful feedback to the user. Forward the call to private member functions that expect concepts instead of unrestricted templates.This way we provide useful error messages to the user but still make our concepts the ultimate arbitror of truth in case our static asserts contain gaps.