Stan Lippman's BLogC++/CLIThe Value of a Value Class- July 23, 2004 A reader questions the nature of the value type when he writes, Sender: Slawomir Lisznianski=====================================1) Lack of support for SMFs makes value classes unnatural to use. An example in the C++CLI spec at page 33 is incorrect, as it uses constructors with value classes. In fact, quite a few value class examples in the specification contradict with paragraph 21.4.1. SMF, for the uninitiated, means special member functions, and in this case refers to the...http://blogs.msdn.com/slippman/archive/2004/07/23/193353.aspx String Literal Conversion to String: Is It a Disaster- July 23, 2004 A reader asks, Sender: Jackre: String Literals are now a Trivial Conversion to StringWon't it break most of existing libraries who will try to port to C++CLI One override for String will break a lot of user code and make calls for the overriden function with string literals look much uglier. Maybe it is better to make two types of string literals differ by, say literal prefix (i.e. old string literals would look like "this" and new ones like c"this") As Adam Merz noted in his...http://blogs.msdn.com/slippman/archive/2004/07/23/192791.aspx String Literal Conversion to String: Is It a Disaster- July 23, 2004 A reader asks, Sender: Jackre: String Literals are now a Trivial Conversion to StringWon't it break most of existing libraries who will try to port to C++CLI One override for String will break a lot of user code and make calls for the overriden function with string literals look much uglier. Maybe it is better to make two types of string literals differ by, say literal prefix (i.e. old string literals would look like "this" and new ones like c"this") As Adam Merz noted in his...http://blogs.msdn.com/slippman/archive/2004/07/23/192731.aspx String Literals are now a Trivial Conversion to String- July 19, 2004 There was a recent internal thread on the resolution of the following set of overloaded member functions of a reference class R. It represents a change in the earlier definition of C++CLI, and a difference in type behavior that I reported in an earlier blog, and so I believe it is worth discussing. Here is the code snippet, public ref class R public: void foo( String ); void foo( const char ); ; void bar( R r ) which one r->foo( "abc"...http://blogs.msdn.com/slippman/archive/2004/07/19/187758.aspx |