#include <iostream>
#include <typeinfo>
using namespace std;


template<typename Lambda>
struct lambda_member : Lambda
{
	
	Lambda& f_;
	lambda_member(Lambda& f) : Lambda(f),
		f_(f)
	{}
	
	auto& get_value1()
	{
		return f_.__value1;
	}

};


int main(){
    auto test = [value1 =0]() mutable {value1+=1; return value1;};
    
    lambda_member<decltype(test)> lm{test};
    
    std::cout << test() << std::endl;
    std::cout << lm.get_value1() << std::endl;
    lm.get_value1() = 22;
    std::cout << test() << std::endl;
    
}