From b483804b0f7777046fc198793f4037b9a9cb080d Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 23 Nov 2016 18:15:51 +0100 Subject: Change order of template instantiations for clang At least Apple's clang-703.0.31 needs this. --- include/astra/Singleton.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/astra/Singleton.h') diff --git a/include/astra/Singleton.h b/include/astra/Singleton.h index 9d3c088..7271691 100644 --- a/include/astra/Singleton.h +++ b/include/astra/Singleton.h @@ -82,15 +82,15 @@ class Singleton { // libastra. This situation would cause issues when .mex files are unloaded. #define DEFINE_SINGLETON(T) \ -template<> void Singleton::construct() { assert(!m_singleton); m_singleton = new T(); } \ -template<> T* Singleton::m_singleton = 0 +template<> T* Singleton::m_singleton = 0; \ +template<> void Singleton::construct() { assert(!m_singleton); m_singleton = new T(); } // This is a hack to support statements like // DEFINE_SINGLETON2(CTemplatedClass); #define DEFINE_SINGLETON2(A,B) \ -template<> void Singleton::construct() { assert(!m_singleton); m_singleton = new A,B(); } \ -template<> A,B* Singleton::m_singleton = 0 +template<> A,B* Singleton::m_singleton = 0; \ +template<> void Singleton::construct() { assert(!m_singleton); m_singleton = new A,B(); } } // end namespace -- cgit v1.2.3 From 71db6331f8dd0d5abbeee92977af01293be4f427 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 28 Nov 2016 15:54:07 +0100 Subject: Update headers (website+2016) --- include/astra/Singleton.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/astra/Singleton.h') diff --git a/include/astra/Singleton.h b/include/astra/Singleton.h index 7271691..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 . ----------------------------------------------------------------------- -$Id$ */ #ifndef _INC_ASTRA_SINGLETON -- cgit v1.2.3