
This brings our tree to NetBSD 7.0, as found on -current on the 10-10-2015. This updates: - LLVM to 3.6.1 - GCC to GCC 5.1 - Replace minix/commands/zdump with usr.bin/zdump - external/bsd/libelf has moved to /external/bsd/elftoolchain/ - Import ctwm - Drop sprintf from libminc Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
52 lines
995 B
C++
52 lines
995 B
C++
template<typename T> struct S {
|
|
__attribute__((always_inline)) static int f() { return 0; }
|
|
__attribute__((always_inline, visibility("hidden"))) static int g() { return 0; }
|
|
};
|
|
|
|
extern template struct S<int>;
|
|
|
|
template<typename T> T min(T a, T b) { return a < b ? a : b; }
|
|
|
|
extern decltype(min(1, 2)) instantiate_min_decl;
|
|
|
|
template<typename T> struct CtorInit {
|
|
static int f() { return 0; }
|
|
int a;
|
|
CtorInit() : a(f()) {}
|
|
};
|
|
|
|
namespace ImplicitSpecialMembers {
|
|
struct A {
|
|
A(const A&);
|
|
};
|
|
struct B {
|
|
A a;
|
|
B(int);
|
|
};
|
|
struct C {
|
|
A a;
|
|
C(int);
|
|
};
|
|
struct D {
|
|
A a;
|
|
D(int);
|
|
};
|
|
}
|
|
|
|
namespace OperatorDeleteLookup {
|
|
struct A { void operator delete(void*); virtual ~A() = default; };
|
|
template<typename T> struct B { void operator delete(void*); virtual ~B() {} typedef int t; };
|
|
typedef B<int>::t b_int_instantated;
|
|
}
|
|
|
|
namespace EmitInlineMethods {
|
|
struct A {
|
|
void f() {}
|
|
void g();
|
|
};
|
|
struct B {
|
|
void f();
|
|
void g() {}
|
|
};
|
|
}
|