jweinst1
9/9/2016 - 2:21 AM

autowrapper.cpp

#include <iostream>

//using auto to wrap general variables

template<class T>
auto var(T elem){
	return elem;
}

int main() {
	auto f = var("hello");
	std::cout << f << std::endl;
	char * a = "hello";
	std::cout << var(a) << std::endl;
	//hello
	//hello
}