3 ms·
A few more alternatives: - B, with an explicit syntax for accessing the "global" x. For instance, ::x, or global::x. - B, with a compile-time warning or error
by JoshTriplett 9y ago
A few more alternatives:
- B, with an explicit syntax for accessing the "global" x. For instance, ::x, or global::x.
- B, with a compile-time warning or error if you shadow a name. This would be my preferred alternative.