wolf [Mon, 25 Mar 2002 14:04:29 +0000 (14:04 +0000)]
Detect and work around the following bug:
dnl /* ----------------------------------------------- */
dnl /* Problem 14: Access control. Friendship is not */
dnl /* granted although explicitly declared. */
dnl template <int N, int M> class T { void bar (); };
dnl
dnl template <int M> class T<1,M> {
dnl private:
dnl static int i;
dnl template <int N1, int N2> friend class T;
dnl };
dnl
dnl template <int N,int M> void T<N,M>::bar () {
dnl T<N-1,M>::i;
dnl };
dnl
dnl template class T<2,1> ;
We work around by making a certain function in the Tensor<1,dim> class public.
wolf [Fri, 22 Mar 2002 18:24:10 +0000 (18:24 +0000)]
Work around a really ugly bug in Suns Forte compiler, which manifests itself at the following testcase:
/* ---------------------------------------------------------- */
/* Internal compiler error in abi2_mangler::entity_expression */
/* when compiled with -g. */
template < int dim > struct T {
typedef T<dim-1> SubT;
T (SubT);
};
template <int dim> T<dim>::T (SubT) {};
template class T<3> ;
If compiled with -g, the compiler gets an internal compiler error...
wolf [Fri, 22 Mar 2002 17:34:02 +0000 (17:34 +0000)]
When we forward declare the general Tensor template, also declare that it has a partial specialization. Otherwise, Sun Forte is confused, but I believe rightfully so. Unfortunately, its error messages are less than helpful in this case...
wolf [Wed, 20 Mar 2002 12:49:59 +0000 (12:49 +0000)]
Work around a problem of Suns Forte compiler which cant handle the case that an enum or a class in a namespace has the same name as the namespace itself, as in
/* ----------------------------------------------- */
/* Problem 10 -- Members with the same name as the */
/* enclosing namespace. */
namespace NS3 {
class NS3 {};
};
NS3::NS3 ns3;
Thus rename the IteratorState enum in the IteratorState namespace into IteratorState_s_.
wolf [Wed, 20 Mar 2002 12:46:21 +0000 (12:46 +0000)]
Work around a problem of Suns Forte compiler which cant handle the case that an enum or a class in a namespace has the same name as the namespace itself, as in
/* ----------------------------------------------- */
/* Problem 10 -- Members with the same name as the */
/* enclosing namespace. */
namespace NS3 {
class NS3 {};
};
NS3::NS3 ns3;
Thus rename the IteratorState enum in the IteratorState namespace into IteratorState_s_.
wolf [Wed, 20 Mar 2002 12:43:38 +0000 (12:43 +0000)]
Work around a problem in Suns Forte compiler, which choked on the explicit qualification of a member template when that member template is an operator, as in
/* --------------------------------------- */
/* Problem 9 -- selecting member templates */
/* by template keyword */
/* (Why does it make a difference whether */
/* member function or operator?) */
class T7 {
template <typename T> void operator << (T);
template <typename T> void f (T);
void g() {
this->template f<int> (1); // OK!
this->template operator<< <int> (1); // not!
};
};
Work around by introducing a common function for the template and the nontemplate function.
wolf [Wed, 20 Mar 2002 12:40:54 +0000 (12:40 +0000)]
Work around a problem of the Sun Forte compiler that chokes on some trailing semicolons, like in
/* ---------------------------------------- */
/* Problem 1 -- extraneous semicolon? */
/* (Why does this go away if not a template */
/* or in a namespace?) */
namespace NS1 {
template <class T>
void test () {};
};
/* ---------------------------------------- */
/* Problem 2 -- extraneous semicolon? */
/* (Why for inner but not outer namespace?) */
namespace NS2 {
namespace NS3 {};
};
wolf [Wed, 20 Mar 2002 12:39:42 +0000 (12:39 +0000)]
Suns Forte compiler chokes on template argument computations, like in
/* ----------------------------------------------- */
/* Problem 5 -- no computations with template args */
template <int dim> struct T2 {};
template <int dim> T2<dim-1> g(T2<dim>) {};
Fix this by introducing a new type local to the class that uses it.
wolf [Mon, 18 Mar 2002 13:09:02 +0000 (13:09 +0000)]
Remove semicolons to work around a bug in Sun Forte. Testcase:
/* ---------------------------------- */
/* Problem 1 -- extraneous semicolon? */
namespace NS1 {
template <class T>
void test () {};
};
Avoid friend declaration of typedefs. Testcase:
/* -------------------------------- */
/* Problem 6 -- friend and typedefs */
class T3;
class T4
{
typedef T3 Tloc;
friend class Tloc;
};
wolf [Mon, 18 Mar 2002 12:26:38 +0000 (12:26 +0000)]
Move implementations to .cc file, since not used very often anyway and
thus no point to mark inline. change triggered by Sun Forte 6.2's
inability to first declare a function, then define it marked
inline. testcase:
wolf [Fri, 8 Mar 2002 09:10:03 +0000 (09:10 +0000)]
Significantly change the way configure works. Mostly, configure.in is now only a list of task to be done, cleanly separated into several categories. The actual work is done by macros in aclocal.m4. Also, config.guess and alike have been banned from the top-level directory and are now in contrib/config.
wolf [Fri, 22 Feb 2002 13:55:10 +0000 (13:55 +0000)]
Disabling variable cache leads to abort here. Since no cache is used anyway since top-level configure doesn't use it, theres no point in mentioning that here.
wolf [Thu, 21 Feb 2002 17:53:43 +0000 (17:53 +0000)]
In an assertion, it was checked whether vertex dof indices for
different children of a face matched each other, for consistency. This
failed if the FE in use does not have dofs on vertices at all. Check
for the vertex index instead of the vertex _dof_ index now.
wolf [Thu, 21 Feb 2002 17:50:46 +0000 (17:50 +0000)]
In an assertion, it was checked whether vertex dof indices for
different children of a face matched each other, for consistency. This
failed if the FE in use does not have dofs on vertices at all. Check
for the vertex index instead of the vertex _dof_ index now.