Re: [sigc] ANNOUNCE: libsigc++ 1.9.11



Am 2003.10.30 12:23 schrieb(en) Roel Vanhout:
[snip]

   Do you know whether a conversion from int to double also triggers
   a warning?)

I just checked, it doesn't.

I've changed float to double in the tests.

Could you try to compile something like:

  #include <iostream>

  struct foo {
    template <class T1>
    void test(T1 p) { std::cout << p << std::endl; }
  };

  int main() {
    foo f;
    f.test<unsigned int>(3);  // variant 1
    // f.template test<unsigned int>(3);  // variant 2
    // f.template void test<unsigned int>(3);  // variant 3
    // f.void test<unsigned int>(3);  // variant 4
    return 0;
  }

and pass me the result?

Variant 1: compiles ok, without a warning.
Variant 2: compiles ok, without a warning.

[snip]

Another problem was in bind_return.h on line 21. It reads

    { functor_.template operator()<typename type_trait<T_arg1>::pass>

Changing that to

    { functor_. operator()<typename type_trait<T_arg1>::pass>

makes it work.

Strange that variant 2 in the example above compiles ok, then.

I'll add

#ifdef MSVC
#define LIBSIGC_TEMPLATE_PREFIX
#else
#define LIBSIGC_TEMPLATE_PREFIX template
#endif

and we can write LIBSIGC_TEMPLATE_PREFIX in template function
instantiations. I wonder what Stroustrup has to say on this topic?!


Another thing I found is on line 516 of slot.h There is a workaround for gcc there (at least that's what the comments say) and the msvc compiles chokes on that line. Maybe that part should be surrounded with compiler-ifdef's.

That's right. I'll comment it out for now. The problem so far occurs
with gcc-3.2 if you write "using namespace SigC" in your code. I have
to check different compilers.

That's all for now, I don't have time to go any further. Please let me know if you want me to do more tests.

I'll send you a test to check for the "using namespace SigC" problem.

Thanks for your investigations!

Regards,

  Martin



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