添加lambda表达式
This commit is contained in:
26
soft/lambda.h
Normal file
26
soft/lambda.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef lambda_h__
|
||||
#define lambda_h__
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
#define lambda(...) 0
|
||||
#define lambda_use
|
||||
|
||||
/*
|
||||
|
||||
使用方法
|
||||
|
||||
在c文件开头添加
|
||||
lambda_use
|
||||
|
||||
|
||||
然后在需要使用lambda的地方添加
|
||||
lambda(
|
||||
void (int a, int b){
|
||||
printf("%d + %d = %d\n", a, b, a+b);
|
||||
}
|
||||
)
|
||||
|
||||
*/
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user