Bug 1248843 - Make it clearer that DebugOnly uses up space even in optimized, non-DEBUG builds. r=Waldo

This commit is contained in:
Jonathan Watt 2016-02-19 12:57:42 +00:00
parent 044a3f21fc
commit 618c28bbdd

View File

@ -30,8 +30,9 @@ namespace mozilla {
* DebugOnly instances can only be coerced to T in debug builds. In release
* builds they don't have a value, so type coercion is not well defined.
*
* Note that DebugOnly instances still take up one byte of space, plus padding,
* when used as members of structs.
* NOTE! DebugOnly instances still take up one byte of space, plus padding, even
* in optimized, non-DEBUG builds. Don't use DebugOnly for struct/class members
* unless that really doesn't matter to you.
*/
template<typename T>
class DebugOnly