AMDG On 07/20/2016 03:08 PM, Nigel Pattinson wrote:
I'm running into a problem with the type erasure library when trying to declare a member called 'data', e.g.
<snip>
This conflicts with the private member variable called 'data' in the any class. SomeClass does compile, but attempting to call the data() does not compile due to the conflict, with the error message being 'cannot access private member ... ' .
I'm not sure if this is a limitation in the library or a compiler bug - I'm using Visual Studio 2015 Update 1. Using boost 1.57.0 at present, I could use a more recent version if that would help.
Does anyone know of a possible workaround ?
I tried to avoid this situation by mangling
private member names, but I obviously forgot
about this one (table too).
The simplest workaround until I fix this is to use
boost::type_erasure::call(has_data