What steps will reproduce the problem?
compile with /clr
What is the expected output? What do you see instead?
operator unspecified_bool_type() const;
will return 0xFFFFFFFF instead of 0 when internal pointer is null
Which version of pugixml are you using? On what operating system/compiler?
pugixml v1.0
win 7
Visual Studio 2008 Pro
Please provide any additional information below.
discussion at:
http://boost.2283326.n4.nabble.com/Problem-with-shared-ptr-in-MSVC8-0-only-when-
compiled-in-clr-mode-td2606055.html
workaround:
static void unspecified_bool( xml_node*** ) {}
typedef void (*unspecified_bool_type)( xml_node*** );
xml_node::operator xml_node::unspecified_bool_type() const
{
return _root ? unspecified_bool : 0;
}
Original issue reported on code.google.com by bmat...@gmail.com on 12 Aug 2011 at 3:47
Original issue reported on code.google.com by
bmat...@gmail.com
on 12 Aug 2011 at 3:47