Boost logo

Boost Users :

From: Dean Kassmann (deankassmann_at_[hidden])
Date: 2006-11-16 16:50:53


With the new changes to asio error handling; I'm updating some code and
running into a problem on windows with vc8

The old syntax:

void my_handler(const asio::error& error) {

  if (!error) {
       // woot sucess
  }
  else {
    // failure
  }
}

The new syntax:

void handler(const boost::system::error_code& error) {

   if (error == boost::asio::error::success) {
          // doesn't work because error_code::category() differs
   }
   else {
      // failure
   }
}

doesn't seem to work because the error_code categories differ. Am I doing
somthing wrong/stupid?

Cheers,
Dean



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net