--- trunk/src/utils/Predicate.hpp 2005/04/22 21:57:16 516 +++ branches/development/src/utils/Predicate.hpp 2012/09/06 19:44:06 1794 @@ -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: @@ -92,7 +100,7 @@ struct PredNotFunctor : public PredFacade< PredNotFunc PredT pred_; }; - inline CharClassification isSpace(const std::locale& loc=std::locale()){ + inline CharClassification isSpace(const std::locale& loc=std::locale()){ return CharClassification(std::ctype_base::space, loc); }