Re: [sigc] ANNOUNCE: libsigc++ 1.9.11
- From: Martin Schulze <martin-ml hippogriff de>
- To: Roel Vanhout <roel riks nl>
- Cc: libsigc-list gnome org
- Subject: Re: [sigc] ANNOUNCE: libsigc++ 1.9.11
- Date: Wed, 29 Oct 2003 22:58:43 +0100
Hi Roel!
What is your opinion: would it be a problem to keep the MSVC compiler
generating these warning for the tests:
- warning C4267: 'argument' : conversion from 'size_t' to 'unsigned
int', possible loss of data
(Why does this stupid comiler choose the 'operator<<(unsigned int)'
overload if size_t cannot be converted into an 'unsigned int'?)
- warning C4244: 'argument' : conversion from 'const int' to 'const
float', possible loss of data
(Can there really be a data loss in a conversion from int to float?
Do you know whether a conversion from int to double also triggers
a warning?)
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?
Also of interest would be if MSVC can handle arithmetic in the
template argument list like we use for the bind adaptor:
#include <iostream>
template <int i>
struct foo {
void test() { std::cout << i << std::endl; }
};
template <int j>
void bar() {
foo<j+1> f; // variant 1
// foo<j?0:1> f; // variant 2
// foo<j?0:j+1> f; // variant 3
// foo<(j?0:j+1)> f; // variant 4
f.test();
}
int main() {
bar<0>();
bar<1>();
return 0;
}
Thanks!
Martin
Am 2003.10.29 12:48 schrieb(en) Roel Vanhout:
Martin Schulze wrote:
Generally, people are wanted to test libsigc++-1.9.11 and
report their experiences on the list, especially those
working with compilers other than gcc-3.2.
I cannot help you with the Forte compiler, but I have made project
files for Visual Studio .Net 2003 for libsigc+++-1.9.11 and the test
files. I have made it so that a .lib file is generated and there is a
project file for every test. The directory structure is as follows:
libsigc++ root
|- docs
|- examples
|- etc...
|- visualstudio
|- sigc
| |- sigc.vcproj
|- tests
| |- test_accumulated
| | |- test_accumulated.vcproj
| |- etc...
|- libsigc.sln
This is how I would do it; if someone wants it in a different way, I
can change it.
Furthermore, I've tried to build it ofcourse. Most of the tests
failed. You can find a buildlog on
http://www.stack.be/~roel/sigc2-vs2003-buildlog.txt. Basically, the
library went ok, and 5 of the tests (test_accumulated,
test_deduce_result_type, test_disconnect, test_mem_fun and
test_ptr_fun) were ok too.
You can have a look at the buildlog and maybe someone can deduce what
the problem is with the rest; I have not enough knowledge of libsigc
to do myself, unfortunately.
For the brave soul who wants to try it, I've put a zip file with the
project files on http://www.stack.be/~roel/visualstudio.zip. Copy it
to your libsigc++ root dir, and unzip there - that will create the
directory structure as described above.
Hope this helps.
cheers,
roel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]