summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/template17.C
blob: 010a1b030525892f065b707d0fccd2c705097296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// { dg-do assemble  }
// 
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 29 Apr 2001 <nathan@codesourcery.com>

// Bug 2258. We failed to implement using directives inside template
// functions. This makes us regress now that ::std is real.

namespace thing
{
  template <typename T> T end2 (T);
}
namespace whatever 
{
}

template <typename T> void fn (T, T (*)(T));

namespace whatever
{
  template <typename T> T end3 (T);
}

template <class T> void mycout(const T& data)
{
  using namespace thing;
  using namespace whatever;
  
  fn (data, end2);
  fn (data, end3);
}

int main()
{
  double data = 5.0;
  mycout(data);
}