Holly S..t, what a solution! Thanks m4ster r0shi for your patience and pointing me to the right direction. I was too fixed to the issues, that I've overseen the problem with the creation of the shared pointer. Bad fault.
I know that the actual source is not optimal and should be refactored. This is my next task, first I would have to fix the issue, what now is done.
Templating is still confusing me a little bit. I'm a novice with it and have to learn much more.
Good to know, where I could find experts like you ;o)