diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2020-05-06 16:06:26 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2020-05-06 16:06:26 -0400 |
commit | ca6f09292925a7bd936338cb598efb3ddc8524bf (patch) | |
tree | 3f27e75fc8443b84e91fcac400084fd83dfed26a /indra/llcommon/llsingleton.h | |
parent | 4768d092f611576b4e4e95574e9b16192e7ced5e (diff) | |
parent | 4a7fd0117a43dca9e30c58c6417ebdf6862561f6 (diff) |
DRTVWR-476: Merge branch 'master' of lindenlab/viewer into DRTVWR-476-boost-1.72
Diffstat (limited to 'indra/llcommon/llsingleton.h')
-rw-r--r-- | indra/llcommon/llsingleton.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index ccd2e48bf2..30a5b21cf8 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -806,6 +806,17 @@ private: \ DERIVED_CLASS(__VA_ARGS__) /** + * A slight variance from the above, but includes the "override" keyword + */ +#define LLSINGLETON_C11(DERIVED_CLASS) \ +private: \ + /* implement LLSingleton pure virtual method whose sole purpose */ \ + /* is to remind people to use this macro */ \ + virtual void you_must_use_LLSINGLETON_macro() override {} \ + friend class LLSingleton<DERIVED_CLASS>; \ + DERIVED_CLASS() + +/** * Use LLSINGLETON_EMPTY_CTOR(Foo); at the start of an LLSingleton<Foo> * subclass body when the constructor is trivial: * @@ -823,4 +834,8 @@ private: \ /* LLSINGLETON() is carefully implemented to permit exactly this */ \ LLSINGLETON(DERIVED_CLASS) {} +#define LLSINGLETON_EMPTY_CTOR_C11(DERIVED_CLASS) \ + /* LLSINGLETON() is carefully implemented to permit exactly this */ \ + LLSINGLETON_C11(DERIVED_CLASS) {} + #endif |