<div dir="ltr"><div>All,</div><div><br></div><div>I've seen discussions come up several times lately about whether you should use MAYBE_UNUSED or UNUSED in what scenario and why do we have two of them anyway.  That got me thinking a bit.  Maybe what we actually want instead of MAYBE_UNUSED is something like this:</div><div><br></div><div>#ifdef NDEBUG</div><div>#define ASSERTED UNUSED</div><div>#else</div><div>#define ASSERTED</div><div>#endif</div><div><br></div><div>That way, if you only need a parameter for asserts, you can declare it ASSERTED and it won't warn in release builds will still throw a warning if you do a debug build which doesn't use it.  Of course, there are other times when something is validly MAYBE_UNUSED such as auto-generated code or the genX code we use on Intel.  However, this provides additional meaning and means the compiler warnings are still useful even after you've relegated a value to assert-only.</div><div><br></div><div>Thoughts?  I'm also open to a better name; that's the best I could do in 5 minutes.</div><div><br></div><div>--Jason<br></div></div>