I Love that New Syntax Smell

C++ articles, code snippets, musings, etc. from Andy RichIf this is your first time here, you may want to check out my blog introduction.

September, 2004

  • I Love that New Syntax Smell

    Deterministic Finalization I - a primer for CLR Dispose

    • 10 Comments
    A large subject like DF needs a few posts. My generalized plan to lay it out will start by describing the CLR's Dispose pattern, how our DF pattern works, and finally how the two patterns fit together. The CLR's Dispose patterns can be quite confusing...
  • I Love that New Syntax Smell

    Another good customer bug

    • 1 Comments
    Reader Andy Neilson writes in with another bug: The current compiler implementation has some problems. If the variable is a field of this, then the compiler will die. For example: class MyClass { public: int i; void Foo() { array<int>^ x = {1, 2...
  • I Love that New Syntax Smell

    I love when customers find bugs!

    • 2 Comments
    Reader Rob Walker asks: Is there a neat way of handling dictionaries? I have a Dictionary<Guid, Object^> and want to iterate over the values. Currently I have to use the syntax: for each(KeyValuePair<Guid, Object^> v in dict) { v.Value .....
  • I Love that New Syntax Smell

    The C++ "for each" syntax

    • 15 Comments
    For Each? I won't go into a huge justification - suffice to say, there are some instances where it is nice to be able to iterate over a set, and perform operations on each member of that set. A good primer might be the MSDN node on C# foreach . A basic...
Page 1 of 1 (4 items)