ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/utils/Predicate.hpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/utils/Predicate.hpp (file contents):
Revision 2212 by tim, Fri Apr 22 21:52:51 2005 UTC vs.
Revision 2515 by tim, Fri Dec 16 18:26:41 2005 UTC

# Line 10 | Line 10 | namespace oopse {
10   #define UTILS_PREDICATE_HPP
11   #include <locale>
12  
13 +
14 +
15 + #if defined(__SUNPRO_CC)
16 + #  define USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
17 + #else
18 + #  define USE_FACET(Type, loc) std::use_facet< Type >(loc)
19 + #endif
20 +
21   namespace oopse {
22  
23   template<typename Derived>
# Line 22 | Line 30 | struct CharClassification: public PredFacade<CharClass
30  
31      template<typename CharT>
32      bool operator()( CharT c ) const {
33 <        return std::use_facet< std::ctype<CharT> >(loc_).is( type_, c );
33 >        return USE_FACET(std::ctype<CharT>, loc_).is( type_, c );
34      }
35  
36      private:
# Line 160 | Line 168 | operator||( const PredFacade<Pred1T>& Pred1, const Pre
168      // Doing the static_cast with the pointer instead of the reference
169      // is a workaround for some compilers which have problems with
170      // static_cast's of template references, i.e. CW8. /grafik/
171 <    return detail::PredOrFunctor<Pred1T,Pred2T>(
171 >    return PredOrFunctor<Pred1T,Pred2T>(
172          *static_cast<const Pred1T*>(&Pred1),
173          *static_cast<const Pred2T*>(&Pred2));
174   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines