STL/CLR verifiable?
When compiling a project with /clr

afe it is still possible to emit unverifiable code. This can happen when using operator* on an iterator which returns int&. Putting the resulting program through peverify results in an error as ByRef cannot be a return type (only locals and arguments).
Example code:
#include
<cliext/vector>
usingnamespace System;
usingnamespace cliext;
int
main(array<String ^> ^args)
{
vector<int> v(1);
vector<int>::iterator it; it = v.begin();
*it = 10;
return 0;
}Is there a way to make operator* verifiable?
Generally the compiler does not complain about returning & types or interior_ptr<> types -- is this by design? -- or is this verifiable now but peverify has not been updated?
[1525 byte] By [
dammy] at [2007-12-16]
STL/CLR is verifiable when used with verifiable types. However, STL/CLR isn't officially part of the beta 2 drop, but we did not remove the alpha level files from the installation.
Returning interior_ptr<> is verifiable under a number of controlled patterns and STL/CLR will conform to those patterns. But the STL/CLR files included in beta 2 has not been tested, and may well contains bugs regarding verifiability.
Anson Tsao
Lead Progarm Manager
Microsoft Visual C++