Greg The attached patch may be better, in which I just define the methods in question inline-- this way you wont have to add any new FORCE* macros. Saves a lot of lines of code, too.
James On Thu, Aug 23, 2012 at 9:08 PM, Greg Landrum <greg.land...@gmail.com>wrote: > Hi James, > > On Fri, Aug 24, 2012 at 1:24 AM, James Swetnam <jswet...@gmail.com> wrote: > > Ironically, I just ran into this same issue with our internal gcc build > > today. I've attached a patch that removes the platform-specific -O0 flag > > for Dict.cpp and replaces the force_types() method with the following, > which > > is somewhat more C++ standard-compliant and portable: > > > > #define ANY_FORCE(T) template T Dict::fromany<T>(const boost::any& arg) > > const; \ > > template boost::any Dict::toany<T>(T arg) const; > > ANY_FORCE(int); > > ANY_FORCE(bool); > > ANY_FORCE(unsigned int); > > ANY_FORCE(double); > > ANY_FORCE(std::string); > > ANY_FORCE(std::vector<int>); > > ANY_FORCE(std::vector<unsigned int>); > > ... > > etc. > > > > You can read up on what's going on here (it's not pretty, nothing with > c++ > > template programming is) here: > > > http://www.parashift.com/c++-faq-lite/separate-template-fn-defn-from-decl.html > > > > Feel free to use the patch or not. Thanks! > > Thanks for the patch! > > I checked the changes in this morning after testing on my windows > build machine and an up-to-date version of linux. I'm guessing this > isn't going to cause any problems with older gcc versions, but I'll > verify that in the next couple days. > > -greg >
dict_patch_header.diff
Description: Binary data
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Rdkit-devel mailing list Rdkit-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-devel