Commit 318e85cf by Jason Merrill

add

From-SVN: r15721
parent 405a745b
// Build don't link:
template<int N_length>
struct B
{
......
// Build don't link:
struct X {
enum {
a = 0,
......
// Build don't link:
template<class T>
struct A {
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>
struct S
{
struct R
{
R();
~R();
};
// Build don't link:
// Special g++ Options: -Wunused
void foo()
{
R r;
int i;
}
template <class T>
struct S
{
struct R
{
R();
~R();
};
S();
~S();
};
void foo()
{
R r; // no warning
int i; // WARNING - unused
}
void f()
{
S<int> si;
si.foo();
}
S();
~S();
};
void f()
{
S<int> si;
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