You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from ../3rdParty/pugixml/pugixml/pugixml.cpp:17:0,
6> from ../3rdParty/pugixml/pugixml/pugiconfig.hpp:42,
6> from BlockHelper.h:2,
6> from BlockHelper.cpp:1:
6> ../3rdParty/pugixml/pugixml/pugixml.hpp: In instantiation of 'pugi::xml_attribute pugi::xml_node::find_attribute(Predicate) const [with Predicate = const char*]':
6> BlockHelper.cpp:38:33: required from here
6>C:\PI\OccupancyLibrary..\3rdParty\pugixml\pugixml\pugixml.hpp(531,20): error : 'pred' cannot be used as a function
6> if (pred(attrib)) <- Error
This could be stupid user tricks(tm) (Myself being the used), but I didn't change the source for pugixml, so it seems buggish.
The text was updated successfully, but these errors were encountered:
I think you meant to call xml_node::attribute() instead of xml_node::find_attribute().
find_attribute is predicate-based - you're meant to provide an object that can be called (e.g. a function or a functor). Unfortunately, there is no good way in C++ to limit the type of the argument to just callables so you get an error inside pugixml implementation.
Yup, chalk one up to stupid user tricks. Thx for the fast reply.
From: Arseny Kapoulkine notifications@github.com
To: zeux/pugixml pugixml@noreply.github.com
Cc: rohmer rohmer@yahoo.com
Sent: Wednesday, February 25, 2015 3:35 PM
Subject: Re: [pugixml] 'pred' cannot be used as a function in xml_attribute find_attribute (#32)
I think you meant to call xml_node::attribute() instead of xml_node::find_attribute().find_attribute is predicate-based - you're meant to provide an object that can be called (e.g. a function or a functor). Unfortunately, there is no good way in C++ to limit the type of the argument to just callables so you get an error inside pugixml implementation.—
Reply to this email directly or view it on GitHub.
In file included from ../3rdParty/pugixml/pugixml/pugixml.cpp:17:0,
6> from ../3rdParty/pugixml/pugixml/pugiconfig.hpp:42,
6> from BlockHelper.h:2,
6> from BlockHelper.cpp:1:
6> ../3rdParty/pugixml/pugixml/pugixml.hpp: In instantiation of 'pugi::xml_attribute pugi::xml_node::find_attribute(Predicate) const [with Predicate = const char*]':
6> BlockHelper.cpp:38:33: required from here
6>C:\PI\OccupancyLibrary..\3rdParty\pugixml\pugixml\pugixml.hpp(531,20): error : 'pred' cannot be used as a function
6> if (pred(attrib)) <- Error
This could be stupid user tricks(tm) (Myself being the used), but I didn't change the source for pugixml, so it seems buggish.
The text was updated successfully, but these errors were encountered: