Here is what I'm trying to do:

I have a legacy function that is used exactly 3 times in our code base. I want to get rid of this function but it will require sometime. Meanwhile, I would like to prevent other developers to use the function elsewhere. Is there a way to enforce this at compile time e.g. with an error?

Any ideas?

**Update:** I forgot to mention that my function resides in a namespace.