Skip to content

Commit

Permalink
Bug 1248843 - Make it clearer that DebugOnly uses up space even in op…
Browse files Browse the repository at this point in the history
…timized, non-DEBUG builds. r=Waldo

--HG--
extra : rebase_source : 6de3e55b8a7c4272bec3b5b8b8eb5da7ad78e9cf
  • Loading branch information
jwatt committed Feb 19, 2016
1 parent 32191b5 commit 8429c38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mfbt/DebugOnly.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8429c38

Please sign in to comment.