[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[cdt-dev] Bug in CDT parser maybe?
|
- From: Joe <jcccnet.cl@xxxxxxxxx>
- Date: Thu, 9 Aug 2012 16:11:16 -0400
- Delivered-to: cdt-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=8Os8lsX9En/dvSJ2mIn6774/MGoGSwiskvotBvYUti8=; b=w4QTdaJr58wYDdrXmjYAJyqCP32C1gNvIc36tqXnjmYpqAjcYLDL55M9w2zDJn9u/S hgYqI+Ob0ehAE31bh+t+aoAGK1WzDTmRNcPBkWvDQYbBlX1vUo3WIoZ5cw1l58yTUneY wTd36XSucGOrdCffsGmgBBkr6AzioN9bL7A0dCDw4sHZfjOXeD6TlcoZvWmxolLOOnKf eyg1COjp0B7+hL0gk17oUc4JlXRUrIS3Ag1MEfI9SW6qMATpzP46OGZRXb4jQDR2m+H+ ZYeudNFNaCuKEghJt6RvklzjlvkxHmC+/kgwCTbfDPj7LICjY7pWwFmoTXnL/HgTzVYF eJLg==
Hello,
When I load this file up in a C++ project I get an error in misc.h in
the editor but I'm able to compile it with g++ file via the eclipse
builder.
This is from the CryptoCPP Libraries.
I get an error about RightShift and LeftShift "could not be resolved"
and F3 pulls up an Open Declaration menu.
Any ideas of what's wrong?
-J
int main(){
return 0;
}
template <bool overflow> struct SafeShifter;
template<> struct SafeShifter<true>
{
template <class T>
static inline T RightShift(T value, unsigned int bits)
{
return 0;
}
template <class T>
static inline T LeftShift(T value, unsigned int bits)
{
return 0;
}
};
template<> struct SafeShifter<false>
{
template <class T>
static inline T RightShift(T value, unsigned int bits)
{
return value >> bits;
}
template <class T>
static inline T LeftShift(T value, unsigned int bits)
{
return value << bits;
}
};
template <unsigned int bits, class T>
inline T SafeRightShift(T value)
{
return SafeShifter<(bits>=(8*sizeof(T)))>::RightShift(value, bits);
}
template <unsigned int bits, class T>
inline T SafeLeftShift(T value)
{
return SafeShifter<(bits>=(8*sizeof(T)))>::LeftShift(value, bits);
}