Replace scope class with struct
Merge pull request #694 from ntrel/scope-guard

Replace scope class with struct