|
Boost Users : |
From: David Ward (David.Ward_at_[hidden])
Date: 2008-03-21 12:18:15
BM:
Great - see you Saturday.
Get a kick out of life - play soccer!
David
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of
boost-users-request_at_[hidden]
Sent: Thursday, March 20, 2008 8:03 PM
To: boost-users_at_[hidden]
Subject: Boost-users Digest, Vol 1577, Issue 3
Send Boost-users mailing list submissions to
boost-users_at_[hidden]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.boost.org/mailman/listinfo.cgi/boost-users
or, via email, send a message with subject or body 'help' to
boost-users-request_at_[hidden]
You can reach the person managing the list at
boost-users-owner_at_[hidden]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Boost-users digest..."
Today's Topics:
1. Re: Boost-users Digest, Vol 1577, Issue 2 (Abir Basak)
2. Re: unordered_set insert returns const_iterator ? (Abir Basak)
3. Re: Boost-users Digest, Vol 1577, Issue 2 (Daniel James)
4. [addressof] Can't obtain the address of an instance of an
anonymous struct (Jean-Francois Bastien)
5. Re: [InterProcess] Compatibility with Boost multi_array
(Ion Gazta?aga)
6. [boost-users][test] Problems calling ::system() (... child
has exited ...) (Darren Garvey)
----------------------------------------------------------------------
Message: 1
Date: Thu, 20 Mar 2008 23:27:32 +0530
From: "Abir Basak" <abirbasak_at_[hidden]>
Subject: Re: [Boost-users] Boost-users Digest, Vol 1577, Issue 2
To: boost-users_at_[hidden]
Message-ID:
<b50981650803201057h2bc805b5o5e57bf92243d749d_at_[hidden]>
Content-Type: text/plain; charset="iso-8859-1"
>
> I don't have access to that compiler. I tried running similar code in
> Visual C++ 6.5 and Visual C++ express 8, and they both worked. I can
> try adding something to the unit tests but that will take me a while
> to work through. At the end of this email is the code I tested with,
> can you try it on your compiler? If it works, I'm doing something
> different to you, do you have any idea what?
>
> thanks,
>
> Daniel
>
> #include <boost/unordered_map.hpp>
> #include <boost/tuple/tuple.hpp>
> #include <iostream>
>
> int main() {
> typedef boost::unordered_multimap<char, int> Mymap;
> Mymap c1;
>
> c1.insert(Mymap::value_type('a', 1));
> c1.insert(Mymap::value_type('a', 2));
> c1.insert(Mymap::value_type('b', 3));
> c1.insert(Mymap::value_type('c', 4));
>
> Mymap::iterator it,end;
> boost::tie(it,end) = c1.equal_range('a');
> for( ; it!=end; ++it) {
> std::cout<<(*it).second<<" ";
> }
> }
Yes, MSVC 9 (i.e 2008) runs it properly, but MSVC 7.1 (2003 . NET)
fails to
compile it.
It looks like, for some reason node_ = data::next_group(node_); from
increment_group() tries to construct data, which is a typedef to
BOOST_UNORDERED_TABLE_DATA even while using static function for that.
just changing the statement to node_ = next_group(node_);
(hash_table_impl.hpp cvs line no 301) works. so it seems, msvc 7. either
doesn't support calling static function by class name typedef, or the
data
typedef is confused with some other (like BOOST_UNORDERED_TABLE) note
node_
= BOOST_UNORDERED_TABLE_DATA::next_group(node_); also works fine.
i tried to produce some simple test case for this, like
class outer{
public:
typedef outer outer_t;
inline static void func(){}
class inner{
void func1(){
outer_t::func();// func() this works;or outer::func() works
}
};
};
this doesn't work in msvc 7.1 but works in 9.0 . i am not sure if it is
valid in standard though.
The error is,
E:\lib\boost\trunk\boost\unordered\detail\hash_table_impl.hpp(301):
error
C2039: 'hash_table_data_equivalent_keys<std::allocator<std::pair<char
const
,int> > >' : is not a member of
'boost::unordered_detail::hash_table_data_equivalent_keys<Alloc>::iterat
or_base'
with
[
Alloc=boost::unordered_detail::hash_types_equivalent_keys<std::pair<cons
t
char,int>,char,boost::hash<char>,std::equal_to<char>,std::allocator<std:
:pair<const
char,int>>>::value_allocator
]
thanks
abir
-------------- next part --------------
HTML attachment scrubbed and removed
------------------------------
Message: 2
Date: Thu, 20 Mar 2008 23:31:13 +0530
From: "Abir Basak" <abirbasak_at_[hidden]>
Subject: Re: [Boost-users] unordered_set insert returns const_iterator
?
To: boost-users_at_[hidden]
Message-ID:
<b50981650803201101g531c82b3q2de2c155b4a906cb_at_[hidden]>
Content-Type: text/plain; charset="iso-8859-1"
>
> I don't have access to that compiler. I tried running similar code in
> Visual C++ 6.5 and Visual C++ express 8, and they both worked. I can
> try adding something to the unit tests but that will take me a while
> to work through. At the end of this email is the code I tested with,
> can you try it on your compiler? If it works, I'm doing something
> different to you, do you have any idea what?
>
> thanks,
>
> Daniel
>
> #include <boost/unordered_map.hpp>
> #include <boost/tuple/tuple.hpp>
> #include <iostream>
>
> int main() {
> typedef boost::unordered_multimap<char, int> Mymap;
> Mymap c1;
>
> c1.insert(Mymap::value_type('a', 1));
> c1.insert(Mymap::value_type('a', 2));
> c1.insert(Mymap::value_type('b', 3));
> c1.insert(Mymap::value_type('c', 4));
>
> Mymap::iterator it,end;
> boost::tie(it,end) = c1.equal_range('a');
> for( ; it!=end; ++it) {
> std::cout<<(*it).second<<" ";
> }
> }
Yes, MSVC 9 (i.e 2008) runs it properly, but MSVC 7.1 (2003 . NET)
fails to
compile it.
It looks like, for some reason node_ = data::next_group(node_); from
increment_group() tries to construct data, which is a typedef to
BOOST_UNORDERED_TABLE_DATA even while using static function for that.
just changing the statement to node_ = next_group(node_);
(hash_table_impl.hpp cvs line no 301) works. so it seems, msvc 7. either
doesn't support calling static function by class name typedef, or the
data
typedef is confused with some other (like BOOST_UNORDERED_TABLE) note
node_
= BOOST_UNORDERED_TABLE_DATA::next_group(node_); also works fine.
i tried to produce some simple test case for this, like
class outer{
public:
typedef outer outer_t;
inline static void func(){}
class inner{
void func1(){
outer_t::func();// func() this works;or outer::func() works
}
};
};
this doesn't work in msvc 7.1 but works in 9.0 . i am not sure if it is
valid in standard though.
The error is,
E:\lib\boost\trunk\boost\unordered\detail\hash_table_impl.hpp(301):
error
C2039: 'hash_table_data_equivalent_keys<std::allocator<std::pair<char
const
,int> > >' : is not a member of
'boost::unordered_detail::hash_table_data_equivalent_keys<Alloc>::iterat
or_base'
with
[
Alloc=boost::unordered_detail::hash_types_equivalent_keys<std::pair<cons
t
char,int>,char,boost::hash<char>,std::equal_to<char>,std::allocator<std:
:pair<const
char,int>>>::value_allocator
]
thanks
(sorry for double posting ... last message subject line was wrong)
abir
-------------- next part --------------
HTML attachment scrubbed and removed
------------------------------
Message: 3
Date: Thu, 20 Mar 2008 18:08:37 +0000
From: "Daniel James" <daniel_james_at_[hidden]>
Subject: Re: [Boost-users] Boost-users Digest, Vol 1577, Issue 2
To: boost-users_at_[hidden]
Message-ID:
<31f5f6790803201108x7ee89578g82296ef4f95ef993_at_[hidden]>
Content-Type: text/plain; charset=ISO-8859-1
On 20/03/2008, Abir Basak <abirbasak_at_[hidden]> wrote:
>
> Yes, MSVC 9 (i.e 2008) runs it properly, but MSVC 7.1 (2003 . NET)
fails to
> compile it.
> It looks like, for some reason node_ = data::next_group(node_); from
> increment_group() tries to construct data, which is a typedef to
> BOOST_UNORDERED_TABLE_DATA even while using static function for that.
> just changing the statement to node_ = next_group(node_);
> (hash_table_impl.hpp cvs line no 301) works. so it seems, msvc 7.
either
> doesn't support calling static function by class name typedef, or the
data
> typedef is confused with some other (like BOOST_UNORDERED_TABLE) note
node_
> = BOOST_UNORDERED_TABLE_DATA::next_group(node_); also works
> fine.
OK, thanks for investigating this. I'll change it to
'BOOST_UNORDERED_TABLE_DATA::next_group(node_)' or something similar.
It's a bit odd that this hasn't shown up in the unit tests, but the
change seems fine. I was only using 'data' for the sake of
readability.
Daniel
------------------------------
Message: 4
Date: Thu, 20 Mar 2008 15:57:30 -0400
From: "Jean-Francois Bastien" <jfbastien_at_[hidden]>
Subject: [Boost-users] [addressof] Can't obtain the address of an
instance of an anonymous struct
To: <boost-users_at_[hidden]>
Cc: Axel Naumann <Axel.Naumann_at_[hidden]>
Message-ID:
<62FC3C78EB032A4DB2AD05F964E931F60A4FCB7A_at_[hidden]>
Content-Type: text/plain; charset="us-ascii"
We're running into an issue with addressof as described at:
https://savannah.cern.ch/bugs/?33071
Basically this fails under GCC 3.4.4 as well as GCC 4.3:
struct // NoName
{
} noName;
void * fail()
{
return addressof(noName);
}
The error message is "no matching function for call to
`addressof(<anonymous struct>&)'".
MSVC 2005 SP1 compiles and runs this with no problem.
The problem seems to be that GCC can't deduce the templated type because
the struct is anonymous. I'm not sure whether this is because it's
non-standard behavior that MSVC accepts and GCC doesn't or because GCC
has a bug.
Either way it would be nice if addressof had a workaround for the
"broken" GCC versions, but I'm not sure what the best workaround would
be. Axel suggested in the above link to C-style cast to char &, but this
causes a problem in the (unlikely) event where operator char &() is
declared in the anonymous struct. We could use template magic to see if
operator char &() is declared, but I'm not very comfortable with such a
huge workaround.
If the discussion points towards a bug in GCC I'll file a bug report
with them, but either way addressof isn't working with GCC 3.4.4 and 4.3
(at least), and it would be nice of Boost to offer a workaround.
------------------------------
Message: 5
Date: Thu, 20 Mar 2008 21:12:15 +0100
From: Ion Gazta?aga <igaztanaga_at_[hidden]>
Subject: Re: [Boost-users] [InterProcess] Compatibility with Boost
multi_array
To: Boost User List <boost-users_at_[hidden]>
Message-ID: <47E2C51F.7060008_at_[hidden]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
sankar lingam wrote:
> But cant this change be requested to Boost Multi.Array?? It would be
> really useful
> to allocate a multi array on shared memory..Would the multi array
> adaptation be difficult for the multi array developers (i meant to
change it)? or
> should I raise a feature request for the same..
I think you should raise a feature request.
> It would be wonderful if the feature comes along
> with the
> boost 1.35 release...
Too late. Boost 1.35 is in RC state :-(
Regards,
Ion
------------------------------
Message: 6
Date: Fri, 21 Mar 2008 00:02:52 +0000
From: "Darren Garvey" <lists.drrngrvy_at_[hidden]>
Subject: [Boost-users] [boost-users][test] Problems calling ::system()
(... child has exited ...)
To: boost-users_at_[hidden]
Message-ID:
<4509b54b0803201702r2559d8ddy6d143a987fe52f37_at_[hidden]>
Content-Type: text/plain; charset="iso-8859-1"
Hello all,
I'm trying to use system calls in a test that uses Boost.Test. I've
been
trying to use Julio Merino Vidal's Boost.Process sandbox code (which I
have
working most of the time), but I've also tried the ::system() call too.
The
following super-simple test case causes the prepended error... The fact
that
I can't get this working makes me wonder if I'm doing something
forbidden?
Platform:
-----------------
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3
--program-suffix=-4.1--enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug
--enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
-----------------
Error:
-----------------
Running 1 test case...
unknown location(0): fatal error in "wget_test_1": child has exited;
pid:
1000; uid: 11541; exit value: 0
*** 1 failure detected in test suite "wget_tests"
EXIT STATUS: 201
-----------------
Program:
-----------------
#define BOOST_TEST_MODULE broken
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE( broken_test )
{
::system("ls");
}
-----------------
Regards,
Darren
-------------- next part --------------
HTML attachment scrubbed and removed
------------------------------
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
End of Boost-users Digest, Vol 1577, Issue 3
********************************************
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net