Modify

Ticket #6620 (closed Bugs: fixed)

Opened 2 years ago

Last modified 23 months ago

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.

Attachments

Change History

comment:2 Changed 23 months ago by chris_kohlhoff

Fix applied to trunk in changeset [78738].

comment:3 Changed 23 months ago by chris_kohlhoff

  • Status changed from new to closed
  • Resolution set to fixed

(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.
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.