language: C++ 4.7.2 (gcc-4.7.2)
date: 946 days 3 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <string.h>
 
template <class T>
void f(T& obj)
{
   T x;
   memcpy(&x,&obj,sizeof (T));
}
 
int main()
{
   int a[30] = {};
   int* p = 0; 
   f(p); //OK
   f(a); //no compile error, binds as reference-to-array
}