Here is my function template:
template <typename T>
void f(vector<T> &a) noexcept(noexcept( /* ??? */ ))
I want to specify this function will not throw an exception given that the assignment operator = of T has noexcept specification. Is there a way to do this?
You can do that with this:
It places a condition on the
noexceptif copy-assigningTvalues is itself declarednoexcept. You can further this into also taking account move-assigningT.