#include <iostream>
using namespace std;

template<typename T=long>
struct Rect{
   T left, top, right, bottom;
   Rect( T l, T t, T r, T b ) : left(l), top(t), right(r), bottom(b) { }
   bool intersects( const Rect<T>& other ) const{
      return other.left <= right  && other.right  >= left
         &&  other.top  <= bottom && other.bottom >= top ;
   }
};

int main(){
   cout << "Intersects: "
        << Rect<>( 0, 0, 20, 20 ).intersects( { 10, 10, 100, 100 } );
   return 0;
}