Commit 318e85cf by Jason Merrill

add

From-SVN: r15721
parent 405a745b
// Build don't link:
template<int N_length> template<int N_length>
struct B struct B
{ {
......
// Build don't link:
struct X { struct X {
enum { enum {
a = 0, a = 0,
......
// Build don't link:
template<class T> template<class T>
struct A { struct A {
typedef T T1; typedef T T1;
......
// Build don't link:
class Base {
public:
class Bar { public: virtual ~Bar() {}; };
};
class Derived : public Base {
public:
class Bar : public Base::Bar {};
};
template <class T>
struct XYZ : public T::Bar {
XYZ(): T::Bar() { }
};
void test() {
XYZ<Base> b;
XYZ<Derived> d;
}
template <class T> // Build don't link:
struct S // Special g++ Options: -Wunused
{
template <class T>
struct S
{
struct R struct R
{ {
R(); R();
...@@ -9,16 +12,16 @@ ...@@ -9,16 +12,16 @@
void foo() void foo()
{ {
R r; R r; // no warning
int i; int i; // WARNING - unused
} }
S(); S();
~S(); ~S();
}; };
void f() void f()
{ {
S<int> si; S<int> si;
si.foo(); si.foo();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment