diff options
author | Geoff Liu <g@geoffliu.me> | 2015-08-30 14:22:11 -0600 |
---|---|---|
committer | Geoff Liu <g@geoffliu.me> | 2015-08-30 14:22:11 -0600 |
commit | eb7e58d5fc649ed2713c7685539bd5edcd9e8ade (patch) | |
tree | 72a9fe5106bed0735089b5c7a2b22540f7ebb3a7 /c++.html.markdown | |
parent | 1d1def16a5d7925bb8f7fba7dc49182e33359e85 (diff) | |
parent | b124fd58df56a5e1ee9925481fbde1f22ccfb386 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'c++.html.markdown')
-rw-r--r-- | c++.html.markdown | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/c++.html.markdown b/c++.html.markdown index efce0053..e45c73c3 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -159,11 +159,12 @@ void foo() int main() { - // Assume everything is from the namespace "Second" - // unless otherwise specified. + // Includes all symbols from `namesapce Second` into the current scope. Note + // that simply `foo()` no longer works, since it is now ambiguous whether + // we're calling the `foo` in `namespace Second` or the top level. using namespace Second; - foo(); // prints "This is Second::foo" + Second::foo(); // prints "This is Second::foo" First::Nested::foo(); // prints "This is First::Nested::foo" ::foo(); // prints "This is global foo" } |