Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] VertexProperties as a Nested Type
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-05-19 17:37:52


Dear Jeremiah,

Let me first say that I updated my GCC to 4.4.0.

> It looks like there are typedefs
> graph_type::vertex_property_type and
> graph_type::edge_property_type in adjacency_list. 

I guess vertex_property_type is deemed to be what I'm looking for. But, it apparently is not implemented in the way it should have been. I say this because when I compile the following funny code:

typedef adjacency_list<vecS, vecS, directedS, string> graph_type;
graph_type::vertex_property_type temp1, temp2;
string str1(temp1);

I receive the following error message:

main.cpp:82: error: no matching function for call to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(boost::property<boost::vertex_bundle_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::no_property>&)'

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:220: note: candidates are: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(typename _Alloc::rebind<_CharT>::other::size_type, _CharT, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:213: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:206: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, typename _Alloc::rebind<_CharT>::other::size_type, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:194: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&, typename _Alloc::rebind<_CharT>::other::size_type, typename _Alloc::rebind<_CharT>::other::size_type, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:184: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&, typename _Alloc::rebind<_CharT>::other::size_type, typename _Alloc::rebind<_CharT>::other::size_type) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:170: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.tcc:178: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.h:2147: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]

I even checked the typeid's for equality and

typeid(graph_type::vertex_property_type) != typeid(string)!

More strangely, I get the following error message when I compile "temp1 == temp2":

main.cpp:83: error: no match for 'operator==' in 'temp1 == temp2'

I'm wondering if this is a bug in GCC 4.4.0? Or, is it because vertex_property_type is not equality comparable?

> They appear to be meant to be public, but I am not sure.

Not sure if I understand this English. But, it wasn't easy to find anything about vertex_property_type. Testimony to this is that the only BGL documentation page that Google finds vertex_property_type in is:

http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/graph_concepts.html

TIA,
--Hossein


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