trying to deal with c++

This commit is contained in:
2022-05-31 14:46:59 +03:00
parent 3cb3dca293
commit 85293d8c32
6 changed files with 64 additions and 19 deletions

View File

@@ -9,6 +9,10 @@ extern "C" {
#include "errors.h"
#include "cptr.h"
#if __cplusplus
#include "errors.hpp"
#endif
// executes codeblock and prints execution time
#ifdef CLOCK_REALTIME // non-standard high-precision clock
#define optime(opname,repeats,codeblock) ({\

9
src/base/errors.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include "errors.hpp"
void throwcpp(err_t eid){
throwcpp(errname(eid));
}
void throwcpp(char* emsg){
__EXIT(emsg);
}

8
src/base/errors.hpp Normal file
View File

@@ -0,0 +1,8 @@
#pragma once
#ifdef __cplusplus
#include "errors.h"
void throwcpp(err_t eid);
void throwcpp(char* emsg);
#endif