pmt: improve PureTuple class and improve function manager.

This commit is contained in:
2025-09-23 14:13:36 +03:00
parent b60c5c023f
commit 0ff94cc4b9
6 changed files with 115 additions and 120 deletions

View File

@@ -214,6 +214,7 @@ public:
};
Data *tuple_data = nullptr;
Data tuple_data_type = { _Type1{}, _Type2{}, _Type3{}};
size_t capacity{}, count{};
PureTuple() : tuple_data(new Data[20]), capacity(20), count(0) {}
@@ -856,7 +857,7 @@ std::string getLibVersion();
#define MKVERSION(name) \
char vinfo[512]; \
sprintf(vinfo, \
"%s 1.2.0\nBuildType: Release\nCompiler: clang\n" \
"%s 1.3.0\nCompiler: clang\n" \
"BuildFlags: -Wall;-Werror;-Wno-deprecated-declarations;-Os", \
name); \
return std::string(vinfo)

View File

@@ -120,11 +120,11 @@ int main(int argc, char **argv) {
<< std::endl;
Helper::PureTuple<int, std::string, bool> values = {
{1, "hi", true}, {2, "im", true}, {3, "helper", false}};
{1, "hi", true}, {2, "im", true}, {3, "helper", false}};
values.insert(std::make_tuple(0, "hi", false));
values.insert(2, "im", true);
values.insert(3, "helper", true);
values.insert({3, "helper", true});
values.pop({3, "helper", true});
values.pop_back();
@@ -141,7 +141,7 @@ int main(int argc, char **argv) {
LOG(WARNING) << "Warning message" << std::endl;
LOG(ERROR) << "Error message" << std::endl;
LOG(ABORT) << "Abort message" << std::endl;
} catch (Helper::Error &err) {
} catch (std::exception &err) {
std::cout << err.what() << std::endl;
return 1;
}