| 1 |
// PR c++/38877 |
| 2 |
|
| 3 |
template<class _T1, class _T2> |
| 4 |
struct 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 |
|
| 15 |
template<class _T1, class _T2> |
| 16 |
inline pair<_T1, _T2> |
| 17 |
make_pair(_T1 __x, _T2 __y) |
| 18 |
{ |
| 19 |
return pair<_T1, _T2>(__x, __y); |
| 20 |
} |
| 21 |
|
| 22 |
template <int dim> class bar; |
| 23 |
|
| 24 |
template <int dim> |
| 25 |
pair<bar<dim> *, unsigned int> |
| 26 |
foo (unsigned int position) |
| 27 |
{ |
| 28 |
const pair<int,unsigned int> tmp; |
| 29 |
return make_pair (new bar<dim>(tmp.first), |
| 30 |
position); |
| 31 |
} |