From c63672c41ae5332a5d123e3d59abf38417fab961 Mon Sep 17 00:00:00 2001 From: Victor Luchits Date: Sat, 12 Oct 2013 15:04:53 +0400 Subject: [PATCH] This should fix compilation in clang ctassert was evaluated in template function (probably due to two-phase name lookup?). Change it to ctassert const char * typestr() { ctassert(); return "ERROR"; } + template const char * typestr() { ctassert(); return "ERROR"; } template<> inline const char *typestr() { return "int"; } template<> inline const char *typestr() { return "uint"; } @@ -439,7 +439,7 @@ struct __ptr { struct FunctionStringProxy { std::string operator()( const char *s ) { - ctassert(); + ctassert(); throw Exception( std::string("FunctionStringProxy base called with " ) + s ); } }; @@ -542,7 +542,7 @@ struct FunctionStringProxy { template struct MethodStringProxy { std::string operator()( const char *s ) { - ctassert(); + ctassert(); throw Exception( std::string( "MethodStringProxy: base class called in " ) + s ); } }; @@ -904,12 +904,12 @@ struct StripThisProxy { // first define structs to get/set arguments (struct to partial-specialize) template struct SetArg { void operator()( asIScriptContext *ctx, int idx, T &t ) { - ctassert(); + ctassert(); } }; template struct GetArg { T operator()() { - ctassert(); + ctassert(); return T(); } }; @@ -1046,7 +1046,7 @@ struct FunctionPtr : FunctionPtrBase { FunctionPtr( asIScriptFunction *fptr=NULL ) : FunctionPtrBase( fptr ) {} R operator()( void ) { - ctassert(); + ctassert(); throw std::runtime_error( "FunctionPtr baseclass called!" ); return R(); } -- 1.8.4