I am writing a header file, in which there is a void Foo()
function in file scope, and I want it to be deleted. Should it be inline
?
void Foo() = delete;
or
inline void Foo() = delete;
Quoting cppreference.com:
A deleted function is implicitly an inline function: its (deleted) definition can appear in more than one translation unit.
So, to answer your question, no explicit inline
-ing is needed.