Boost logo

Boost Users :

Subject: [Boost-users] [asio] STL issues OS X 10.5 (intel)
From: Jeffrey Aigner (enumeration_at_[hidden])
Date: 2009-06-28 03:48:07


I am trying to learn the asio library via the tutorials on the
website. I am using XCode on OS X 10.5 (intel).

After compiling successfully, I get runtime errors (after program
listing):

Program:

#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>

int main()
{
        boost::asio::io_service io;
        
        boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
        t.wait();
        
        std::cout << "Hello, world!\n";
        
        return 0;
}

Runtime Errors:

Macintosh:Debug jaigner$ ./proxy
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/debug/
safe_iterator.h:127:
     error: attempt to copy-construct an iterator from a singular
iterator.

Objects involved in the operation:
iterator "this" @ 0x0x1002b0 {
type =
N11__gnu_debug14_Safe_iteratorIN10__gnu_norm14_List_iteratorISt4pairIPvPN5boost4asio6detail11timer_queueINS6_11time_traitsINS5_10posix_time5ptimeEEEE10timer_baseEEEEN15__gnu_debug_def4listISG_SaISG_EEEEE
  (mutable iterator);
   state = singular;
}
iterator "other" @ 0x0xbffff4e4 {
type =
N11__gnu_debug14_Safe_iteratorIN10__gnu_norm14_List_iteratorISt4pairIPvPN5boost4asio6detail11timer_queueINS6_11time_traitsINS5_10posix_time5ptimeEEEE10timer_baseEEEEN15__gnu_debug_def4listISG_SaISG_EEEEE
  (mutable iterator);
   state = singular;
}
Abort trap

Any help would be appreciated!

--Jeff Aigner


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