Skip to content
Snippets Groups Projects
Commit 772b121a authored by Brad King's avatar Brad King
Browse files

BUG: Fixed member template test to not produce a test program that crashes when it runs.

parent bddcf4ec
No related branches found
No related tags found
No related merge requests found
......@@ -86,14 +86,15 @@ template <class U>
class A
{
public:
U* ptr;
template <class V> U m(V* p) { return *ptr = *p; }
U u;
A(): u(0) {}
template <class V> V m(V* p) { return *p = u; }
};
int main()
{
A<int> a;
short s = 0;
A<short> a;
int s = 1;
return a.m(&s);
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment