none
why are attributes not supported in vc2012?

Answers

  • Read the blog and the comments. They didn't get it in. You won't however have to wait for a new major release, they will add the other features in an update...
    • Marked as answer by Steve Richter Friday, June 01, 2012 12:29 PM
    Friday, June 01, 2012 12:19 PM

All replies

  • Read the blog and the comments. They didn't get it in. You won't however have to wait for a new major release, they will add the other features in an update...
    • Marked as answer by Steve Richter Friday, June 01, 2012 12:29 PM
    Friday, June 01, 2012 12:19 PM
  • On 6/1/2012 7:34 AM, Steve Richter wrote:

    looking over this list, http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx , it says attributes are not supported in vs2012.  Why is that? Attributes are such a big part of C#.

    ... but they are a much smaller part of C++. Note that a conforming compiler is allowed to ignore all attributes, and doing so should not change the meaning of a valid program. Which means that attributes are only useful as optimization hints or to improve diagnostic.

    Compare and contrast with C#, where attributes can alter the run-time behavior of a program in arbitrary ways.


    Igor Tandetnik

    Friday, June 01, 2012 5:44 PM
  • C# attributes don't really alter run-time behavior either, at least not directly. Attributes in C# (.net) are just a way to augment the metadata associated with their target. They are const data objects stored along with the type information that is compiled into the assembly and made available at run-time through reflection. In that sense, they are just data.

    Without reflection, I don't see how C++11 attributes could ever be as useful as .net attributes.

    Sunday, July 22, 2012 10:23 PM
  • Attributes are useful for all kinds of low-level hackery - where C++ (or even plain C)  is the main language. Just browse the GCC manual for __attribute__  or MSC docum for __declspec etc. It was nice for the new standard to "legalize" attributes - but we still can use the compiler specific constructs, as always. The less news, the better the news...

    -- pa


    • Edited by Pavel A Sunday, July 22, 2012 10:38 PM
    Sunday, July 22, 2012 10:38 PM