last changes from bloomberg.

This commit is contained in:
Vahagn Khachatryan
2021-03-25 08:15:36 -04:00
parent 1a17b9fe6c
commit 721e183dc9
20 changed files with 1391 additions and 0 deletions

23
cpp/shared_ptr_cast.cpp Normal file
View File

@@ -0,0 +1,23 @@
/* Check cf5-opt.vim defs.
VIM: let b:lcppflags="-std=c++11 -O2 -pthread"
*/
#include <memory>
class A
{
int i;
};
class B : public A
{
int j;
};
int main()
{
std::shared_ptr<A> a = std::make_shared<B>();
std::shared_ptr<B> b = std::static_pointer_cast<B>(a);
}