C++11 - casting from base class shared_ptr to drived class shared_ptr
1 2 3 4 5 6 7 class BaseClass : public std::enable_shared_from_this<BaseClass> { template <typename Derived> std::shared_ptr<Derived> G...
1 2 3 4 5 6 7 class BaseClass : public std::enable_shared_from_this<BaseClass> { template <typename Derived> std::shared_ptr<Derived> G...
1 2 3 4 5 6 7 var ui = TaskScheduler.FromCurrentSynchronizationContext(); Task.Factory.ContinueWhenAll(tasks.ToArray(), result => { var ti...
1 2 git commit --reedit-message=HEAD --reset-author git commit -c HEAD --res
1 2 3 4 5 6 git rm --cached -r .# Remove everything from the index. git reset --hard# Write both the index and working directory from git's database. git add...
when resizing or relocating memory in std::vector, if item supports move constructor std::vector can optimize on relocation operation.