Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7160: BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG and DATE_TIME_NO_DEFAULT_CONSTRUCTOR
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-15 21:19:21
#7160: BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG and DATE_TIME_NO_DEFAULT_CONSTRUCTOR
------------------------------------------------------------+---------------
Reporter: Ricky Stoneback <rwstoneback@â¦> | Owner: viboes
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: thread
Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords: thread, asio, ptime, posix_time
------------------------------------------------------------+---------------
Comment (by Ricky Stoneback <rwstoneback@â¦>):
Issue 1 happens any time a ptime default constructor is used...which I'm
also now realizing includes creating a deadline_timer. The following
creates the same run-time error (in Debug):
{{{
#define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
#include <iostream>
#include <boost/thread.hpp>
#include <boost/asio.hpp>
class ThreadClass
{
public:
ThreadClass(){}
void operator()(){return;}
};
int main()
{
boost::asio::io_service ioService;
boost::asio::deadline_timer x(ioService);
ThreadClass tc;
boost::thread t(tc);
t.join(); //causes a runtime access violation here
std::cout << "done" << std::endl;
system("pause");
return 0;
}
}}}
Since I am writing a library for people to use, I cannot simply say that
it's OK that it doesn't break in Release.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7160#comment:6> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC