Consider this case. I am writing a library and want to wrap my data in a namespace. For example:
//header.h
#pragma once
namespace wrapper
{
// some interface functions here..
}
And I want to make my namespace private. So that no one can write anything in it. For instance, we can always write something like this.
namespace std
{
// some data here..
}
So I want to prevent the last case. Is there any technique to do that besides using static functions wrapped in a class?
internal_
are used to make it clear for every one. – Scrivenclasses
asstatic
data and you can make thatprivate
. PS: I'm not even sure what you mean by data. It would be nice to see some sample concept code in the question. – Rubiaceous