Opened 7 years ago

Closed 6 years ago

Last modified 4 years ago

#6620 closed Bugs (fixed)

Boost Asio error with (unreleased) gcc 4.7 - monotonic / steady clock

Reported by: ramon.casellas@… Owned by: chris_kohlhoff
Milestone: Boost 1.50.0 Component: asio
Version: Boost Development Trunk Severity: Problem
Keywords: std::chrono monotonic_clock steady_clock Cc:


Dear Chris,

I'm aware gcc 4.7 is not released yet, however I'm using it to test some c++11 features. Unfortunately Boost Asio fails to compile due to the name change monotonic_clock to steady_clock, I am reporting it "early" :) 4.6.2

    /// monotonic_clock
    struct monotonic_clock

4.7 snapshot

    /// steady_clock
    struct steady_clock


In file included from /adnet/src/cttc-pce-trunk/apps/common/connection.hpp:19:0,
                 from /adnet/src/cttc-pce-trunk/apps/common/client.cpp:13:
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp: At global scope:
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp:48:30: error: 'monotonic_clock' is not a member of 'std::chrono'
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp:48:30: error: 'monotonic_clock' is not a member of 'std::chrono'
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp:48:58: error: template argument 1 is invalid
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp:48:58: error: template argument 2 is invalid
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp:48:58: error: template argument 3 is invalid
/adnet/boost-1.49.0/include/boost/asio/steady_timer.hpp:48:72: error: invalid type in declaration before ';' token

Thanks in advance and thanks for your work with boost asio R.

Change History (4)

comment:2 Changed 6 years ago by chris_kohlhoff

Fix applied to trunk in changeset [78738].

comment:3 Changed 6 years ago by chris_kohlhoff

Resolution: fixed
Status: newclosed

(In [78740]) Merge from trunk:

  • Add support for g++ 4.7 when compiling in C++11 mode. Update revision history. Fixes #6620.
  • Use the thread's private_op_queue for handlers returned by the reactor task. This fixes a problem where signal_set handlers are not being called when the io_service's concurrency hint is set to 1. Fixes #6657.

comment:4 Changed 4 years ago by anonymous

i don't think this is fixed

Note: See TracTickets for help on using tickets.