none
Std::List - Has_container() does not exist in VS2012 built in functions RRS feed

All replies

  • Has_container() does not exist in Vs2012.    What should I use to replace that function?

    Thanks

    Tuesday, September 3, 2019 9:18 PM
  • Hi,

    Thank you for posting here.

    >>Has_container() does not exist in Vs2012.    What should I use to replace that function?

    Could you please tell me are you building and running a distributed system with Apache Mesos? If so I suggest you should post the issue in a Mesos forum. And this thread will be moved to Off-Topic Posts.

    Best Regards,

    Jeanine Zhang

    • Proposed as answer by Guido Franzke Wednesday, September 4, 2019 5:52 AM
    Wednesday, September 4, 2019 3:19 AM
    Moderator
  • How should we know?  What is it supposed to do?  Where did you find it?

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Wednesday, September 4, 2019 8:38 PM
  • Are you coming from Java?  In C++, an object or variable does not know that it is or was in a container.  It might be in a container or not, or it might be in many containers.

    You'll need to rewrite your code so it does not get that information from the item.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Wednesday, September 4, 2019 8:42 PM
  • Hi,

    >>Std::List - Has_container() does not exist in VS2012 built in functions

    I coun't find this function on msdn anymore. Where did you find it? How to use it?

    I could only find this function in the Mesos source code. If you are building and running a distributed system with Apache Mesos,I suggest you should post the issue in a Mesos forum.

    Best Regards,

    Jeanine Zhang


    Thursday, September 5, 2019 2:33 AM
    Moderator
  • Hi,

    Has_container() from std::list (c++) that was used in the code compiled using VS2008 .  I am trying to port the code to VS2012 and got compilation error. 

    Has_container() is found in c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xutility.cc.  It was removed in VS2012.

    Thanks,

    Anthy V.

    Thursday, September 5, 2019 8:41 PM
  • You are correct.  It was removed from VS2012.  It was just an implementation detail of Microsoft's implementation of STL, and you should not have been using it in your own code.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Friday, September 6, 2019 12:24 AM