Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


On 09/27/2014 08:44 PM, Michael Stahl wrote:
On 27/09/14 15:10, Miklos Vajna wrote:
On Fri, Sep 26, 2014 at 02:33:38PM -0700, Michael Stahl <mstahl@redhat.com> wrote:
+class SolarMutexTryAndBuyGuard
+    : private boost::noncopyable
+{
+    private:
+        bool m_isAcquired;
+#if OSL_DEBUG_LEVEL > 0
+        bool m_isChecked;
+#endif

Isn't this exactly the situation when we should use DBG_UTIL and not
OSL_DEBUG_LEVEL -- i.e. when the conditional part results in a different
class layout?

in general, you are of course right.

but this all-inline guard class can only sensibly be used within a
single function, with the life time limited to a single stack frame;
this should imply that the situation where multiple compilation units
built with different OSL_DEBUG_LEVEL access the same instance with
different layout cannot happen.

ODR violators will be prosecuted.

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.