[glibmm/glibmm-2-52] RefPtr: Clarify comment about undefined behaviour



commit c47bdacd6215d09efd0b5e70dbb411790e370515
Author: Daniel Boles <dboles src gmail com>
Date:   Wed May 31 21:07:57 2017 +0100

    RefPtr: Clarify comment about undefined behaviour
    
    Dereferencing a null pointer does not necessarily cause a segfault:
    it is undefined behaviour, which means anything, or nothing, may happen.
    Avoid setting an expectation that a segfault will reliably occur here.

 glib/glibmm/refptr.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index 892b6a6..a597078 100644
--- a/glib/glibmm/refptr.h
+++ b/glib/glibmm/refptr.h
@@ -88,7 +88,7 @@ private:
 public:
   /** Default constructor
    *
-   * Afterwards it will be null and use of -> will cause a segmentation fault.
+   * Afterwards it will be null and use of -> will invoke undefined behaviour.
    */
   inline RefPtr() noexcept;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]