Boost logo

Boost Users :

Subject: Re: [Boost-users] Issues trying to use boost::unordered_map
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-09-29 01:41:34


On 29/09/2016 17:39, Ram wrote:
> Will try that and let you know Gavin! Also wanted to know if it is
> possible to get the compiler error(the exact location) in my
> pre-processed file?

If you rename the .i file as a .cpp you can then add it to your project
and right-click-Compile it individually. If it still shows the original
line numbers then generate the .i file again but turn on the "Preprocess
Suppress Line Numbers" setting as well.

> Since we saw the error in construct in buckets.hpp. I searched for
> "construct(" in my pre-processed file. This is the template replacement,
[...]
> template<class _Ty1,
> class _Ty2> inline
> void _Construct(_Ty1 *_Ptr, _Ty2&& _Val)
> {
> void *_Vptr = _Ptr;
> ::new (_Vptr) _Ty1(::std:: forward<_Ty2>(_Val));
> }
> template<class _Ty1> inline
> void _Construct(_Ty1 *_Ptr)
> {
> void *_Vptr = _Ptr;
> ::new (_Vptr) _Ty1();
> }

Well, it doesn't look like there's anything weird going on in there.
Though if you do the above to locate exactly which line it's objecting
to, it might help.

Since this is C++11 code, let's go back to basics for a moment. Exactly
*which* version of Visual Studio are you using? (Both the main version
and which Update you've installed. You can check that in the About window.)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net