27 lines
		
	
	
		
			293 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			293 B
		
	
	
	
		
			C
		
	
	
	
	
	
#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
 |