keep the declaration and definition in the same namespace
Merge pull request #702 from ruil2/enc_function

keep the declaration and definition in the same namespace