/* ====================================================================
 * Copyright (c) 2003-2006, Martin Hauner
 *                          http://subcommander.tigris.org
 *
 * Subcommander is licensed as described in the file doc/COPYING, which
 * you should have received as part of this distribution.
 * ====================================================================
 */

/**
 * a = b =>  0
 * a < b => -1
 * a > b =>  1
 */
template<typename A, typename B> int compare3( const A& a, const B& b )
{
  if( a == b )
  {
    return 0;
  }

  if( a < b )
  {
    return -1;
  }

  // a > b
  return 1;
}


syntax highlighted by Code2HTML, v. 0.9.1