Boost logo

Boost :

Subject: Re: [boost] [winapi] Problem with the latest clang on Windows
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-06-01 11:15:45


On Monday 01 June 2015 18:01:48 Peter Dimov wrote:
> Andrey Semashev wrote:
> > If the compiler checks that C++ declarations of the similarly named extern
> > "C" functions have the same argument types then this is a showstopper and
> > I don't think we can do anything except to always include and use
> > windows.h on that compiler.
>
> Maybe we can, but I'm not sure if it's worth it.
>
> // at global scope
> struct FILETIME;
> extern "C" __declspec(dllimport) void __stdcall
> GetSystemTimeAsFileTime(FILETIME*);
>
> namespace winapi
> {
> struct FILETIME { ... };
>
> inline void GetSystemTimeAsFileTime( FILETIME * p )
> {
> ::GetSystemTimeAsFileTime( (::FILETIME*)p );
> }
> }

Interesting idea, I haven't though about it.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk