Boost logo

Boost :

Subject: Re: [boost] boost chrono bad_cast (gcc > 4.9 on Mac)
From: Thomas Trummer (th.trummer_at_[hidden])
Date: 2016-05-01 04:45:59

> On 30 Apr 2016, at 18:14, Min Yang Jung <myj_at_[hidden]> wrote:
> I was wondering if Boost.Chrono works with gcc > 4.9 on Mac. When system_clock::now() is called, it throws an std::bad_cast exception. The binary from the same code doesn’t have the issue if compiled with clang on Mac and gcc > 4.9 on Linux.

#include <boost/chrono.hpp>
#include <iostream>

int main()
    std::cout << boost::chrono::system_clock::now() << std::endl;

Works with Boost 1.60 and the following compilers:

g++-4.9 (Homebrew gcc49 4.9.3) 4.9.3
g++-5 (Homebrew gcc 5.3.0) 5.3.0
Apple LLVM version 7.3.0 (clang-703.0.29)


Boost list run by bdawes at, gregod at, cpdaniel at, john at