Commit 6e5ef0b1 authored by David Lam's avatar David Lam Committed by Facebook Github Bot

add comment to singletonWarnDoubleRegistrationAndAbort

Summary: Would help make these types of errors easier to debug

Reviewed By: yfeldblum, ot

Differential Revision: D10857148

fbshipit-source-id: fbb1defbde2f3695e91da92ca502c0a0aed4c7ec
parent ea2d4e84
...@@ -53,6 +53,8 @@ void SingletonHolder<T>::registerSingleton(CreateFunc c, TeardownFunc t) { ...@@ -53,6 +53,8 @@ void SingletonHolder<T>::registerSingleton(CreateFunc c, TeardownFunc t) {
* Singleton<int> a([] { return new int(3); }); * Singleton<int> a([] { return new int(3); });
* Singleton<int> b([] { return new int(4); }); * Singleton<int> b([] { return new int(4); });
* *
* Adding tags should fix this (see documentation in the header).
*
*/ */
singletonWarnDoubleRegistrationAndAbort(type()); singletonWarnDoubleRegistrationAndAbort(type());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment