This is still the way to do it. Unfortunately you cannot declare or define functions within a namespace like you would do with a class: you need to actually wrap them in a namespace block.
More Related Contents:
- Should a class be thread-safe? [closed]
- ifstream* Segmentation fault [closed]
- A short C++ program about the pointer
- C++ while loop resetting variables?
- I upgraded C++ projects from Visual Studio 2010 to 2015 still its showing Visual Studio (2010)
- How to access a local variable from a different function using pointers?
- Why pass by const reference instead of by value?
- ‘printf’ vs. ‘cout’ in C++
- smart pointers (boost) explained
- How do I make my program watch for file modification in C++?
- Efficient 128-bit addition using carry flag
- CreateFile: direct write operation to raw disk “Access is denied” – Vista, Win7
- OS specific instructions in CMAKE: How to?
- Pure virtual functions may not have an inline definition. Why?
- Override a member function with different return type
- fatal error LNK1104: cannot open file ‘libboost_system-vc110-mt-gd-1_51.lib’
- cpu dispatcher for visual studio for AVX and SSE
- Is most vexing parse a formally defined concept
- C++ Object Instantiation
- What’s the difference between while(cin) and while(cin >> num)
- Use Visual Studio 2012 and compile with older platform toolset?
- C++: how to get fprintf results as a std::string w/o sprintf
- Mock non-virtual method C++ (gmock)
- Why am I able to make a function call using an invalid class pointer
- CMake: Project structure with unit tests
- C++11 std::threads vs posix threads
- Where ampersand “&” can be put when passing argument by reference?
- Mechanism of Vptr and Vtable in C++
- Access to method pointer to protected method?
- What is the modern, correct way to do type punning in C++?