remove boost and json

This commit is contained in:
Andrey Zimin
2024-05-15 18:52:32 +03:00
parent b14e81244d
commit 478e417dc1
77 changed files with 49210 additions and 163 deletions

View File

@@ -2,7 +2,7 @@
#include <experimental/source_location>
#include "boost/type_index.hpp"
// #include "boost/type_index.hpp"
#include "hack/view/color.hpp"
#include "hack/concepts/concepts.hpp"
@@ -32,13 +32,13 @@ namespace hack
print(args...);
}
template<typename... Args>
static void type_trace(const Args&... args)
{
std::cout << make_type_view << ": " << view::color::reset;
count = sizeof...(Args);
print(boost::typeindex::type_id<Args>().pretty_name()...);
}
// template<typename... Args>
// static void type_trace(const Args&... args)
// {
// std::cout << make_type_view << ": " << view::color::reset;
// count = sizeof...(Args);
// print(boost::typeindex::type_id<Args>().pretty_name()...);
// }
private:
std::experimental::source_location location;

View File

@@ -4,7 +4,6 @@
#include "hack/string/string_concat_helper.hpp"
#include "hack/concepts/concepts.hpp"
#include "nlohmann/json.hpp"
// HERE
// начинаем тут
@@ -12,8 +11,6 @@
// сделать все через шаблоны с концептом запроса на существование нужных методов
namespace hack::utils
{
using JSON = nlohmann::json;
template<hack::concepts::is_string First>
std::string make_one(First f)
{
@@ -56,11 +53,18 @@ namespace hack::utils
return f_str + std::string(",");
}
inline std::string make_one(JSON f)
inline std::string make_one(const std::string& f)
{
std::string f_str = nlohmann::to_string(f);
auto f_str = f;
f_str = std::regex_replace(f_str, std::regex("'"), "[quote]");
return hack::string::str_concat + "'" + f_str + "'::jsonb,";
}
template<typename Json>
inline std::string make_one(const Json& f)
{
auto f_str = f;
f_str = std::regex_replace(f_str, std::regex("'"), "[quote]");
return hack::string::str_concat + "'" + f_str + "'::jsonb,";
}

View File

@@ -42,7 +42,7 @@ headers = [
sources = []
lib = library(
'hack',
meson.project_name(),
include_directories : inc,
sources: [headers, sources],
dependencies : deps,