Bug report in date_time, 1.33.0, not fixed in CVS
Boost::date_time uses FILETIME internally to get subsecond time resolution timestamps. When using date_time in a managed C++ environment, the compiler (VC7.1) can't differentiate between the windows global FILETIME, and the .NET System::Runtime::InteropServices::FILETIME, and therefore throws an error. If the boost header file microsec_time_clock.hpp (in boost/date_time) changes the types FILETIME to the global namespace ::FILETIME, then the naming collision goes away. This has only been tested in a limited arena, but I believe it should not affect other areas). Thank you Eric T. ________________________________________ I let my mind wander and it didn't come back.
Eric Teutsch
When using date_time in a managed C++ environment, the compiler (VC7.1) can't differentiate between the windows global FILETIME, and the .NET System::Runtime::InteropServices::FILETIME
I know that it is popular in .Net to have "using" declarations for everything (maybe because C# lacks namespace aliases) but why do you put them before the include files?
Hmm. I already had removed all the using namespaces in my code, but I dug into the code again, and found a "using namespace" in another header file which was called AFTER the boost header -- and when I removed that header and expressly added System::Runtime::InteropServices:: to all the methods, then it worked without modifying the header file. Thanks for pointing out that there must be another using namespace somewhere. Don't you think that FILETIME should be preceded by :: though? I.e. be explicit in which namespace it exists? Eric T.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Martin Adrian Sent: Monday, November 20, 2006 15:33 To: boost-users@lists.boost.org Subject: Re: [Boost-users]Bug report in date_time, 1.33.0, not fixed in CVS
Eric Teutsch
writes: When using date_time in a managed C++ environment, the compiler (VC7.1) can't differentiate between the windows global FILETIME, and the .NET System::Runtime::InteropServices::FILETIME
I know that it is popular in .Net to have "using" declarations for everything (maybe because C# lacks namespace aliases) but why do you put them before the include files?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Eric Teutsch
-
Martin Adrian