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

34
cpp/shared_ptr.cpp Normal file
View File

@@ -0,0 +1,34 @@
/*
VIM: let b:lcppflags="-std=c++14 -O2 -pthread -I."
VIM: let b:wcppflags="/O2 /EHsc /DWIN32"
VIM-: let b:argv=""
*/
#include <iostream>
#include <exception>
#include <chrono>
int main ( void )
{try{
auto begin = std::chrono::high_resolution_clock::now();
//......
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> seconds = end - begin;
std::cout << "Time: " << seconds.count() << std::endl;
return 0;
}
catch ( const std::exception& e )
{
std::cerr << std::endl
<< "std::exception(\"" << e.what() << "\")." << std::endl;
return 2;
}
catch ( ... )
{
std::cerr << std::endl
<< "unknown exception." << std::endl;
return 1;
}}