* how to mimic __has_assign from windows compiler ?
@ 2008-12-08 12:21 mkandula
0 siblings, 0 replies; only message in thread
From: mkandula @ 2008-12-08 12:21 UTC (permalink / raw)
To: gcc-help
Hi,
I am porting mluabind so that it can compile and run using gcc 4.3.
I am hitting this problem where the code uses __has_assign from windows. I
assume this type trait feauture is not present in GCC. Can someone help me
or hint on how I can get the code to work by some alternative example ?
some code I a posting from the project where it uses this
-------------------------------------------
[code]
template <class _Base, class _P>
int MemberClass<_Base,_P>::PerformNewIndexOperator(lua_State *L,
LuaCustomVariable *_lcv, int _valind)
{
typedef ExtractRefValueFromMember<_Base, _P> tmp;
if(Loki::TypeTraits<typename tmp::Type>::isConst)
{
CHost::GetFromLua(L)->Error("MemberClass::PerformNewIndexOperator: can't
assign to a const variable.\n");
return 0;
};
bool can_perform =
(__has_nothrow_assign(typename tmp::Type) ||
__has_assign(typename tmp::Type) ||
Loki::TypeTraits<typename tmp::Type>::isFundamental) &&
!Loki::TypeTraits<typename tmp::Type>::isConst;
if( can_perform != 0 )
{
return DummyBranch<_Base, _P,Me, true>::PerformNewIndexOperatorImpl(L,
_lcv, _valind, this);
}
else
{
CHost::GetFromLua(L)->Error("MemberClass::PerformNewIndexOperator: left
value has no assign operator.\n");
return 0;
}
return 0;
};
[\code]
--
View this message in context: http://www.nabble.com/how-to-mimic-__has_assign-from-windows-compiler---tp20894315p20894315.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-08 12:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 12:21 how to mimic __has_assign from windows compiler ? mkandula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).