Re: How to check if a custom class has a private object set?
Mihai Dobrescu <[email protected]> Fri, 16 Dec 2016 05:13:41 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
I have a class C with instance function F() and static function S(). I would call: var c = new C(); c.F(); C.S(); << here crashes as explained What I might do wrong, considering I try to extract an instance if there is one or not - when not a nullptr should be returned? I know this might be misleading, so the idea here is that I use generic template functions, even though I don't really use the object instance if any. But, anyway, when I need an instance, I should be able to check if there is something <> nullptr or not.