summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/constexpr-null1.C
blob: 44cf9a0b9c6b22d52db8e721088eb7eb22cb67f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/46670
// { dg-options -std=c++0x }

extern unsigned char __TBB_ReverseByte(unsigned char src);
extern unsigned char *reversed;
template<typename T> T __TBB_ReverseBits(T src)
{
  unsigned char *original = (unsigned char *) &src;
  for( int i = sizeof(T)-1; i--; )
    reversed[i] = __TBB_ReverseByte( original[sizeof(T)-i-1] );
}