trying to deal with c++
This commit is contained in:
@@ -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
9
src/base/errors.cpp
Normal 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
8
src/base/errors.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "errors.h"
|
||||
|
||||
void throwcpp(err_t eid);
|
||||
void throwcpp(char* emsg);
|
||||
#endif
|
||||
Reference in New Issue
Block a user