[ create a new paste ] login | about

Link: http://codepad.org/03FSqZC6    [ raw code | fork ]

C++, pasted on Oct 31:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma pack(push, 1)
template <typename T>
struct S
{
   T t;

   inline void Set(const T& val) {}
};
#pragma pack(pop)

int main() {
    typedef char (carray)[10];
    S<carray> lhs;
    carray rhs = "HELLO";
    lhs.Set(rhs);
    return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: