[sigc] Re: [Bug 147391] - test_lambda does not compile with SUN Forte 5.5



Hi!

Okay, back to this problem.
I'm trying to find a working configure check. Damien, Could you please try to compile the attached source file and post the compiler output?

Thanks,

 Martin


Am 25.07.2004 13:27:08 schrieb(en) Damien Carbery:
As I sent the mail I noticed that I hadn't added any text but I did
attach the file (which was only 300 or so bytes of commented lines).
I am dialing into my work email from home, using the web interface. I
never sent an attachment before.

Here is the file inline:
/* sigc++config.h.  Generated by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* #undef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD */
/* #undef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD */
/* #undef SIGC_OPERATOR_OVERLOAD_AMBIGUITY */
=== end of file ===

----- Original Message -----
From: Martin Schulze <martin-ml hippogriff de>
Date: Saturday, July 24, 2004 7:29 pm
Subject: Re: [Bug 147391] - test_lambda does not compile with SUN
Forte 5.5

> Damien, there neither seems to be a (new) message body nor an
> attachment in your mail?!
>
>  Martin
>
> Am 24.07.2004 13:56:59 schrieb(en) Damien Carbery:
> >
> >
> > ----- Original Message -----
> > From: Martin Schulze <martin-ml hippogriff de>
> > Date: Friday, July 23, 2004 10:33 pm
> > Subject: Re: [Bug 147391] - test_lambda does not compile with SUN
> > Forte 5.5
> >
> > > Hi Damien!
> > >
> > > Could you please send me the sigc++config.h that was generated?
> > > Obviously, the configure check I've added doesn't work.
> > >
> > > I'm attaching the configure check as a source file in case
anyone
> > > has
> > > an idea. It succeeds with gcc and MSVC. Obviously, it also
> succeeds> >
> > > with the SUN Forte but it should fail because it simulates the
> code> > of
> > > the lambda operator overloads which doesn't compile.
> > >
> > > Thanks!
> > >
> > >  Martin
> > >
> > >
> > > Am 23.07.2004 19:10:05 schrieb(en) Damien Carbery:
> > > > It failed in test_lambda.c
> > > > Log attached.
> > > >
> > > > [cut]
>


#include <iostream>

  struct Thing
  {};

  template<class T>
  struct OtherThing
  {};

  /* test 1 */
  template <class T1, class T2>
  Thing operator+ (const OtherThing<T1>& a1, const T2& a2) { return Thing(); }

  template <class T1, class T2>
  Thing operator+ (const T1& a1, const OtherThing<T2>& a2) { return Thing(); }

  template <class T1, class T2>
  Thing operator+ (const OtherThing<T1>& a1, const OtherThing<T2>& a2) { return Thing(); }


  /* test2 */
  template <class T1, class T2>
  Thing operator- (const OtherThing<T1>& a1, T2 a2) { return Thing(); }

  template <class T1, class T2>
  Thing operator- (T1 a1, const OtherThing<T2>& a2) { return Thing(); }

  template <class T1, class T2>
  Thing operator- (const OtherThing<T1>& a1, const OtherThing<T2>& a2) { return Thing(); }


int main() {
  Thing thing;
  OtherThing<int> other_thing;

  Thing thing1 = thing + other_thing;
  Thing thing2 = other_thing + thing;
  Thing thing3 = other_thing + other_thing;

  Thing thing4 = thing - other_thing;
  Thing thing5 = other_thing - thing;
  Thing thing6 = other_thing - other_thing;
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]