Merge remote-tracking branch 'refs/remotes/origin/main'

v1
Brett 2024-01-25 10:01:03 -05:00
commit 4116404763
2 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,8 @@ namespace blt
void deallocate(pointer p, size_t n) noexcept void deallocate(pointer p, size_t n) noexcept
{ {
if (p == nullptr)
return;
// for (size_t i = 0; i < n; i++) // for (size_t i = 0; i < n; i++)
// p[i].~T(); // p[i].~T();
for (auto*& blk : blocks) for (auto*& blk : blocks)

View File

@ -212,6 +212,12 @@ namespace blt
//#define BLT_LAMBDA(type, var, code) [](const type& var) -> auto { return code; } //#define BLT_LAMBDA(type, var, code) [](const type& var) -> auto { return code; }
//#define BLT_LAMBDA(var, code) [](var) -> auto { return code; } //#define BLT_LAMBDA(var, code) [](var) -> auto { return code; }
/*
* std::visit(blt::lambda_visitor{
* lambdas...
* }, data_variant);
*/
// TODO: WTF // TODO: WTF
template<class... TLambdas> template<class... TLambdas>
struct lambda_visitor : TLambdas... { struct lambda_visitor : TLambdas... {