diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-20 18:14:37 +0000 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-20 18:14:37 +0000 |
| commit | 9634bcf488f45675e53a761808f59881b57cbe8c (patch) | |
| tree | 40b695d7acb23e381331bda92c9f7550d655749e /indra/llcommon/llsingleton.h | |
| parent | de17c53ae32fef76827201ed24a5af137af12313 (diff) | |
| parent | d7f1c88c35849e56f5b352f13c16a08467d1533b (diff) | |
Merged master into DRTVWR-508
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 0da6d548ab..7def9b019c 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -764,6 +764,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: * @@ -781,4 +792,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 |
