Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 6
    @一二三: not really no. Commented Sep 11, 2011 at 13:32
  • 1
    why not just write int tab[] = {a, a+1, a+1}? I don't get the point. Commented Sep 11, 2011 at 13:34
  • 1
    @Tomalak Whereas I know that there is no C/C++, it would still be nice to know what both standards say about this. Commented Sep 11, 2011 at 13:35
  • @Andreas The question is surely not how to best accomplish this or how you can do it alternatively, but if this is UB or not. And this is IMHO a very interesting question which I myself would like to be answered. Commented Sep 11, 2011 at 13:37
  • @Andreas: The point is to know the rules for referring to previous element initialisers later on in a list-initialiser. Seems pretty clear. Commented Sep 11, 2011 at 13:37