Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3105 closed Bugs (fixed)

error C2872: 'time_t' : ambiguous symbol in microsec_time_clock.hpp line 168 :

Reported by: Kevin Duffy <duffy151+boost@…> Owned by: az_sw_dude
Milestone: Boost 1.40.0 Component: date_time
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:


Using MS Visual Studio 2008, If I have a time_t type defined, this error will occur as the compile can't resolve if the time_t is my type or the one from the one in \microsoft visual studio 9.0\vc\include\crtdefs.h(580) : time32_t time_t

The fix is trivial; simply need to qualify the time_t in the static_cast of the cited line. diff attached.

Attachments (1)

microsec_time_clock.hpp.patch (1.4 KB) - added by Kevin Duffy <duffy151+boost@…> 8 years ago.
Patch that adds std:: namespace

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Kevin Duffy <duffy151+boost@…>

Patch that adds std:: namespace

comment:1 Changed 8 years ago by Andrey Semashev

This isn't really a good idea to override standard types in user's code. However, it's pretty easy to fix.

comment:2 Changed 8 years ago by Andrey Semashev

Resolution: fixed
Status: newclosed

(In [53627]) Fixes #3105.

comment:3 Changed 8 years ago by Andrey Semashev

(In [53628]) Fixes #3105.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain az_sw_dude.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.