--- trunk/src/utils/Predicate.hpp 2005/04/22 21:52:51 515 +++ branches/development/src/utils/Predicate.hpp 2010/07/09 23:08:25 1465 @@ -10,8 +10,16 @@ #define UTILS_PREDICATE_HPP #include -namespace oopse { + +#if defined(__SUNPRO_CC) +# define USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) +#else +# define USE_FACET(Type, loc) std::use_facet< Type >(loc) +#endif + +namespace OpenMD { + template struct PredFacade{}; @@ -22,7 +30,7 @@ struct CharClassification: public PredFacade bool operator()( CharT c ) const { - return std::use_facet< std::ctype >(loc_).is( type_, c ); + return USE_FACET(std::ctype, loc_).is( type_, c ); } private: @@ -160,7 +168,7 @@ operator||( const PredFacade& Pred1, const Pre // Doing the static_cast with the pointer instead of the reference // is a workaround for some compilers which have problems with // static_cast's of template references, i.e. CW8. /grafik/ - return detail::PredOrFunctor( + return PredOrFunctor( *static_cast(&Pred1), *static_cast(&Pred2)); }