You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
656 B
22 lines
656 B
/* |
|
* Copyright (C) 2023 Riyi |
|
* |
|
* SPDX-License-Identifier: MIT |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <iterator> // std::distance |
|
#include <unordered_map> |
|
|
|
#include "blaze/env/environment.h" |
|
#include "blaze/forward.h" |
|
|
|
#define ADD_FUNCTION(name, signature, documentation, lambda) \ |
|
blaze::Environment::registerFunction( \ |
|
{ name, \ |
|
signature, \ |
|
documentation, \ |
|
[](blaze::ValueVectorConstIt begin, blaze::ValueVectorConstIt end) -> blaze::ValuePtr lambda }); |
|
|
|
#define SIZE() std::distance(begin, end)
|
|
|