1// PR c++/38877 2 3template<class _T1, class _T2> 4struct pair 5{ 6 typedef _T1 first_type; 7 typedef _T2 second_type; 8 _T1 first; 9 _T2 second; 10 pair () : first(), second() { } 11 pair(const _T1& __a, const _T2& __b) 12 : first(__a), second(__b) { } 13}; 14 15template<class _T1, class _T2> 16inline pair<_T1, _T2> 17make_pair(_T1 __x, _T2 __y) 18{ 19 return pair<_T1, _T2>(__x, __y); 20} 21 22template <int dim> class bar; 23 24template <int dim> 25pair<bar<dim> *, unsigned int> 26foo (unsigned int position) 27{ 28 const pair<int,unsigned int> tmp; 29 return make_pair (new bar<dim>(tmp.first), 30 position); 31 } 32