On Thu, 6 Sep 2012 10:47:23 +0300 Michael Shigorin wrote: > On Wed, Sep 05, 2012 at 10:01:18PM +0000, ALT beekeeper wrote: > > SimGear-2.8.0-alt1 > > /usr/src/RPM/BUILD/SimGear-2.8.0/simgear/scene/material/Effect.cxx:708:67: > > instantiated from here > > /usr/include/boost/functional/hash/extensions.hpp:257:34: > > error: no matching function for call to 'hash_value(const > > osg::Shader::Type&)' /usr/include/boost/functional/hash/extensions.hpp:257:34: > > note: candidates are: > > А с этим что делать? > В принципе, сборка чинится приложенным патчем, но мне он не нравится. История на английском, на случай связи с апстримом: Since boost 1.51.0 boost::hash_value is implemented using SFINAE to avoid implicit casts to built in types when calling it [1]. Because of that compiler can't use boost::hash_value(int) for enum osg::Shader::Type any more. Thus one can't use osg::Shader::Type as a (part of) key for boost::unordered_map. The proper solution is to overload hash_value function for osg::Shader::Type as described in [2]. This function should be found via argument dependent lookup (ADL), so it must be defined in osg namespace. I don't know if it is appropriate for OpenSceneGraph to add it (also it should not hurt), and how it should be implemented in that case. So in my patch I put it right into simgear/scene/material/Effect.cxx, which of course is a dirty hack. Maybe, the best solution would be to change implementation of hash_value(const ProgramKey& key) (simgear/scene/material/Effect.cxx, line 712). References: [1] http://www.boost.org/users/history/version_1_51_0.html [2] http://www.boost.org/doc/libs/1_51_0/doc/html/hash/custom.html -- WBR, Ivan A. Melnikov