Opened 14 years ago
Closed 14 years ago
#2566 closed Bugs (wontfix)
Cannot have a 'short' member in a bundled property when saving with read_graphml
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | Boost 1.38.0 | Component: | graph |
Version: | Boost 1.37.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I have a graph with a bundled property whose one of the members is a 'short'. When calling read_graphml, it throws an exception:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast>
'
what(): boost::bad_any_cast: failed conversion using boost::any_cast
Same problem with 'unsigned short'. With 'int' and 'long', it works.
Change History (3)
comment:1 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 14 years ago
"change your bundled property to an int" This is what I did and it is OK (It was an IP port number which fits in an int of course).
comment:3 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Closing as wontfix because this would seem to require a rewrite of the reader to solve.
It appears that there is a one-to-one mapping between GraphML attribute types and data types in bundled properties. Therefore, it is likely not possible to allow other data types in bundled properties within the current implementation of the GraphML reader. Is it possible to change your bundled property to an int type instead? Otherwise, when you are setting up your dynamic_properties structure, you could wrap the property map in one that does the casts back and forth between int and short.