Mike Parker wrote:
...
Denis Koroskin wrote:
No, it shouldn't. You may implement function bodies in other modules and/or languages (in C, for example, just make sure names have proper mangling).

Right, but it just feels wrong to me for constructors & destructors since they are a required part of the class. Either you implement one or you don't, but simply declaring one without an implementation feels like an error to me.

Without this feature, .di files wouldn't work. The advantage is that functions without bodies are faster for the compiler to parse, when it it's not going to compile them anyway. You can also use it for hiding implementation, if you don't want your source to be available.

Reply via email to