Re: [Boost-users] Boost-users Digest, Vol 1577, Issue 3

BM:
Great - see you Saturday.
Get a kick out of life - play soccer!
David
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of
boost-users-request@lists.boost.org
Sent: Thursday, March 20, 2008 8:03 PM
To: boost-users@lists.boost.org
Subject: Boost-users Digest, Vol 1577, Issue 3
Send Boost-users mailing list submissions to
boost-users@lists.boost.org
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@lists.boost.org
You can reach the person managing the list at
boost-users-owner@lists.boost.org
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"
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
#include #include <iostream> int main() { typedef boost::unordered_multimap
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
participants (1)
-
David Ward