The project calls functions from a library. I want to move those functions behind a namespace so that is easier to spot the places on the codebase where those functions are being called.
How functions are being called:
#include "foo.h"
int main()
{
foo();
bar();
return 0;
}
How I want to call them:
#include "myfoo.h"
int main()
{
thatlibrary::my_foo();
thatlibrary::my_bar();
return 0;
}
How I implemented that:
myfoo.h
namespace thatlibrary
{
void my_foo();
void my_bar();
}
myfoo.cpp
namespace thatlibrary
{
void my_foo()
{
foo();
}
void my_bar()
{
bar();
}
}
Wondering if there is any other solution? Perhaps more elegant.