1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-09-02 19:22:49 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Geoff Liu
2015-08-30 14:22:11 -06:00
33 changed files with 4781 additions and 756 deletions

View File

@@ -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"
}