static protected field in C++/CX RRS feed

  • Question

  • I have a template internal ref class that has a std::vector as a static member. I want to have the vector be protected so that derived classes can initialize it.

    I have the vector with private protected visibility (it really didn't like protected).  When I attempt to access the vector from the derived class I get an unresolved external symbol error.  When I try to define the vector outside of the class definition I get a static data members of WinRT types must be defined within the class definition error.

    How would I define the vector inside of the template?  I know how to define a static member for a template, but I just cannot figure out for a template ref class.

    Monday, February 11, 2013 6:37 PM