Created by: Sand3r-
This PR introduces some of the requested changes from the @tpatejko's review from the previous PR https://github.com/PaddlePaddle/Paddle/pull/14351.
Introduced: https://github.com/PaddlePaddle/Paddle/pull/14351#pullrequestreview-176253297 Not introduced: https://github.com/PaddlePaddle/Paddle/pull/14351#pullrequestreview-176254380 Because this scenario will never occur. https://github.com/PaddlePaddle/Paddle/pull/14351#pullrequestreview-176255008 Because usings are not inherited, and using typedef instead causes the necessity to use full type specifier (which considering all the namespace qualifiers get quite big and clutters the code badly).