ADT
        arm-eh
        ast-experimental
        enum
        forall-pointer-decay
        jacob/cs343-translation
        new-ast-unique-expr
        pthread-emulation
        qualifiedEnum
      
      
        
          | Last change
 on this file since 7cef785 was             604e76d, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago | 
        
          | 
initial setup for general and concurrency papers
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            879 bytes | 
      
      
| Rev | Line |  | 
|---|
| [604e76d] | 1 | #pragma once | 
|---|
|  | 2 | #include <utility> | 
|---|
|  | 3 |  | 
|---|
|  | 4 | template<typename R, typename S> struct pair { | 
|---|
|  | 5 | R first; | 
|---|
|  | 6 | S second; | 
|---|
|  | 7 |  | 
|---|
|  | 8 | pair() = default; | 
|---|
|  | 9 | pair( R&& x, S&& y ) : first( std::move(x) ), second( std::move(y) ) {} | 
|---|
|  | 10 |  | 
|---|
|  | 11 | bool operator< (const pair<R, S>& o) const { | 
|---|
|  | 12 | return first < o.first || ( first == o.first && second < o.second ); | 
|---|
|  | 13 | } | 
|---|
|  | 14 |  | 
|---|
|  | 15 | bool operator<= (const pair<R, S>& o) const { | 
|---|
|  | 16 | return first < o.first || ( first == o.first && second <= o.second ); | 
|---|
|  | 17 | } | 
|---|
|  | 18 |  | 
|---|
|  | 19 | bool operator== (const pair<R, S>& o) const { return first == o.first && second == o.second; } | 
|---|
|  | 20 |  | 
|---|
|  | 21 | bool operator!= (const pair<R, S>& o) const { return first != o.first || second != o.second; } | 
|---|
|  | 22 |  | 
|---|
|  | 23 | bool operator> (const pair<R, S>& o) const { | 
|---|
|  | 24 | return first > o.first || ( first == o.first && second > o.second ); | 
|---|
|  | 25 | } | 
|---|
|  | 26 |  | 
|---|
|  | 27 | bool operator>= (const pair<R, S>& o) const { | 
|---|
|  | 28 | return first > o.first || ( first == o.first && second >= o.second ); | 
|---|
|  | 29 | } | 
|---|
|  | 30 | }; | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.