~zorba-coders/zorba/trunk

« back to all changes in this revision

Viewing changes to src/util/stl_util.h

  • Committer: Zorba Build Bot
  • Author(s): nbrinza at gmail
  • Date: 2013-05-08 16:41:56 UTC
  • mfrom: (11430.1.5 bug-1176038)
  • Revision ID: chillery+buildbot@lambda.nu-20130508164156-cwjml1065glcvww8
Fixed a bug in the parser that was revealed by bison 2.7 + #include clean-up Approved: Paul J. Lucas, Nicolae Brinza

Show diffs side-by-side

added added

removed removed

Lines of Context:
421
421
  return true;
422
422
}
423
423
 
 
424
inline std::enable_if<!ZORBA_TR1_NS::is_signed<char>::value
 
425
                   && !ZORBA_TR1_NS::is_unsigned<char>::value,
 
426
                      bool>::type
 
427
ge0( char c ) {
 
428
  return c >= 0;
 
429
}
 
430
 
424
431
template<typename NumericType> inline
425
432
typename std::enable_if<ZORBA_TR1_NS::is_signed<NumericType>::value,bool>::type
426
433
lt0( NumericType n ) {
433
440
  return false;
434
441
}
435
442
 
 
443
inline std::enable_if<!ZORBA_TR1_NS::is_signed<char>::value
 
444
                   && !ZORBA_TR1_NS::is_unsigned<char>::value,
 
445
                      bool>::type
 
446
lt0( char c ) {
 
447
  return c < 0;
 
448
}
 
449
 
436
450
template<typename NumericType> inline
437
451
typename std::enable_if<ZORBA_TR1_NS::is_signed<NumericType>::value,bool>::type
438
452
le0( NumericType n ) {
445
459
  return n == 0;
446
460
}
447
461
 
 
462
inline bool le0( char c ) {
 
463
  return c <= 0;
 
464
}
 
465
 
448
466
///////////////////////////////////////////////////////////////////////////////
449
467
 
450
468
//