diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-09-15 16:38:08 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-09-15 16:38:08 +0200 |
commit | aa31a06235496c0d808e57c8ce914cb4b640bc6e (patch) | |
tree | 33385e828ddca0b2857bac9e3dac4dd3723a3eee /include/astra/Singleton.h | |
parent | f6aa2db83dfea89f9d2cfc6fcbd3da141ee77e02 (diff) | |
parent | 00a1c6118b2d64b867c8e640c295462bcccfc7c9 (diff) | |
download | astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.gz astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.bz2 astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.xz astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.zip |
Merge branch 'master' into parallel_vec
Diffstat (limited to 'include/astra/Singleton.h')
-rw-r--r-- | include/astra/Singleton.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/astra/Singleton.h b/include/astra/Singleton.h index 9d3c088..b823c0f 100644 --- a/include/astra/Singleton.h +++ b/include/astra/Singleton.h @@ -1,10 +1,10 @@ /* ----------------------------------------------------------------------- -Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp - 2014-2015, CWI, Amsterdam +Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp + 2014-2016, CWI, Amsterdam Contact: astra@uantwerpen.be -Website: http://sf.net/projects/astra-toolbox +Website: http://www.astra-toolbox.com/ This file is part of the ASTRA Toolbox. @@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------- -$Id$ */ #ifndef _INC_ASTRA_SINGLETON @@ -82,15 +81,15 @@ class Singleton { // libastra. This situation would cause issues when .mex files are unloaded. #define DEFINE_SINGLETON(T) \ -template<> void Singleton<T >::construct() { assert(!m_singleton); m_singleton = new T(); } \ -template<> T* Singleton<T >::m_singleton = 0 +template<> T* Singleton<T >::m_singleton = 0; \ +template<> void Singleton<T >::construct() { assert(!m_singleton); m_singleton = new T(); } // This is a hack to support statements like // DEFINE_SINGLETON2(CTemplatedClass<C1, C2>); #define DEFINE_SINGLETON2(A,B) \ -template<> void Singleton<A,B >::construct() { assert(!m_singleton); m_singleton = new A,B(); } \ -template<> A,B* Singleton<A,B >::m_singleton = 0 +template<> A,B* Singleton<A,B >::m_singleton = 0; \ +template<> void Singleton<A,B >::construct() { assert(!m_singleton); m_singleton = new A,B(); } } // end namespace |