Opened 11 years ago

Closed 10 years ago

Last modified 8 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:

Description

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

#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
    /// monotonic_clock
    struct monotonic_clock

4.7 snapshot

#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
    /// steady_clock
    struct steady_clock
    {

compiling:

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 by chris_kohlhoff, 10 years ago

Fix applied to trunk in changeset [78738].

comment:3 by chris_kohlhoff, 10 years ago

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 by anonymous, 8 years ago

i don't think this is fixed

Note: See TracTickets for help on using tickets.