Boost logo

Boost Users :

Subject: [Boost-users] Problem updating code to boost 1.64
From: Tim Burgess (tim_at_[hidden])
Date: 2017-09-21 15:36:49


Hi,

 

I have an application that I'm resurrecting. I originally coded it using
Visual Studio 2010 with the boost that was current at the time (not sure
what version that was). The following line of code used to build fine:

 

                if (CurrentAction[ 0].As <std::wstring>().compare(
wstrFunctionName) == 0)

 

With my current boost 1.64, I get the following error:

 

>c:\users\tim\projects\surfacereader\screenreaderfunctionsdlg.cpp(146):
error C2039: 'As': is not a member of 'boost::any'

 

The intent of the code is as follows:

 

If CurrentAction[ 0] (which is a boost::any) contains an std::wstring value,
compare it to wstrFunctionName.

 

Can anybody offer some guidance, please?

 

Best wishes.

 

Tim Burgess

 



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