T (SubT);
};
- template <int dim> T<dim>::T (SubT) {};
+ template <int dim> T<dim>::T (SubT) {}
- template class T<3> ;
+ template class T<3>;
],
[],
[
template <int N,int M> int T<N,M>::bar () {
return T<N-1,M>::i;
- };
+ }
- template class T<2,1> ;
+ template class T<2,1>;
],
[],
[
struct X
{
template <typename T2>
- X operator = (T2 &) { return X(); };
+ X operator = (T2 &) { return X(); }
};
template X X::operator=<float> (float &);
C(const C<T>&);
template <typename N> friend class C;
};
- };
+ }
- namespace NS2 { template <typename number> class C; };
+ namespace NS2 { template <typename number> class C; }
template <typename T> class X {
template <typename N> friend class NS2::C;
namespace NS {
template<typename T>
inline C<T>::C(const C<T>&)
- {};
- };
-
+ {}
+ }
],
[],
[
template <int dim>
Function<dim>::~Function ()
- {};
+ {}
template class Function<1>;
template Function<1>::~Function();
};
template <template <int> class T>
- void X<T>::foo (type) {};
+ void X<T>::foo (type) {}
template struct X<TT>;
],
T (SubT);
};
- template <int dim> T<dim>::T (SubT) {};
+ template <int dim> T<dim>::T (SubT) {}
- template class T<3> ;
+ template class T<3>;
int
main ()
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- template <int N, int M> class T { void bar (); };
+ template <int N, int M> struct T { int bar (); };
- template <int M> class T<1,M> {
+ template <int M> struct T<1,M> {
+ T ();
private:
static int i;
template <int N1, int N2> friend class T;
};
- template <int N,int M> void T<N,M>::bar () {
- T<N-1,M>::i;
- };
+ template <int N,int M> int T<N,M>::bar () {
+ return T<N-1,M>::i;
+ }
- template class T<2,1> ;
+ template class T<2,1>;
int
main ()
struct X
{
template <typename T2>
- X operator = (T2 &){};
+ X operator = (T2 &) { return X(); }
};
template X X::operator=<float> (float &);
C(const C<T>&);
template <typename N> friend class C;
};
- };
+ }
- namespace NS2 { template <typename number> class C; };
+ namespace NS2 { template <typename number> class C; }
template <typename T> class X {
template <typename N> friend class NS2::C;
namespace NS {
template<typename T>
inline C<T>::C(const C<T>&)
- {};
- };
-
+ {}
+ }
int
main ()
};
template <typename T> class X<1,T> {
- X () { Y<T>::i; }; // access private field
+ int f () { return Y<T>::i; }; // access private field
};
template class X<1,int>;
template <int dim>
Function<dim>::~Function ()
- {};
+ {}
template class Function<1>;
template Function<1>::~Function();
};
template <template <int> class T>
- void X<T>::foo (type t) {};
+ void X<T>::foo (type) {}
template struct X<TT>;
void f(T<dim>);
template <int dim, template <int> class T>
- void g()
+ void* g()
{
void (*p) (T<dim>) = &f<dim,T>;
+ return (void*)p;
}
- template void g<2,X> ();
+ template void* g<2,X> ();
int
main ()
void f()
{
- long double *p1, *p2;
- double *p3;
+ long double *p1=0, *p2=0;
+ double *p3=0;
copy (p1, p2, p3);
p3 = copy (p1, p2, p3);
};
main ()
{
- unsigned int i = std::numeric_limits<unsigned int>::min();
+ return std::numeric_limits<unsigned int>::min();
;
return 0;
main ()
{
-unsigned int seed = 0;
+int seed = 0;
int i=rand_r(&i);
;