paxos.cc
bool
proposer::majority(const std::vector<std::string> &l1, 
		const std::vector<std::string> &l2)
{
  unsigned n = 0;

  for (unsigned i = 0; i < l1.size(); i++) {
    if (isamember(l1[i], l2))
      n++;
  }
  return n >= (l1.size() >> 1) + 1;
}
// check if the servers in l2 contains a majority of servers in l1
check if the servers in l2 contains a majority of servers in l1
check if the servers in l2 contains a majority of servers in l1
bool
proposer::majority(const std::vector<std::string> &l1, 
		const std::vector<std::string> &l2)
{
  unsigned n = 0;
  for (unsigned i = 0; i < l1.size(); i++) {
    if (isamember(l1[i], l2))
      n++;
  }
  return n >= (l1.size() >> 1) + 1;
}
bool proposer :: majority ( const std :: vector < std :: string > & l1 , const std :: vector < std :: string > & l2 ) { unsigned n = 0 ; for ( unsigned i = 0 ; i < l1 . size ( ) ; i ++ ) { if ( isamember ( l1 [ i ] , l2 ) ) n ++ ; } return n >= ( l1 . size ( ) >> 1 ) + 1 ; }
check if the servers in l2 contains a majority of servers in l1
check if the servers in l2 contains a majority of servers in l1