mirror of
https://github.com/boostorg/boost.git
synced 2025-04-07 06:24:59 +00:00
add old-style "for" scoping workaround by Vesa Karvonen
[SVN r12375]
This commit is contained in:
parent
ec6afe4bee
commit
1858f24020
1 changed files with 11 additions and 0 deletions
|
@ -126,6 +126,17 @@ int main()
|
|||
|
||||
<strong>Workaround:</strong> Enclose the offending <code>for</code>
|
||||
loops in another pair of curly braces.
|
||||
<p>
|
||||
Another possible workaround (brought to my attention by Vesa Karvonen)
|
||||
is this:
|
||||
<pre>
|
||||
#ifndef for
|
||||
#define for if (0) {} else for
|
||||
#endif
|
||||
</pre>
|
||||
|
||||
Note that platform-specific inline functions in included headers might
|
||||
depend on the old-style <code>for</code> scoping.
|
||||
|
||||
|
||||
<h3>[inclass-member-init] In-class member initialization</h3>
|
||||
|
|
Loading…
Add table
Reference in a new issue