#include <iostream>
#include <typeinfo>

template<typename T>
void tester(T&)
{
	std::cout << "tester(" << typeid(T).name() << "&):\n\tlvalue reference - " << std::boolalpha <<
		std::is_lvalue_reference<T>::value << "\n\trvalue reference - " << std::is_rvalue_reference<T>::value << '\n';
}

template<typename T>
void tester(T&&)
{
	std::cout << "tester(" << typeid(T).name() << "&&):\n\tlvalue reference - " << std::is_lvalue_reference<T>::value
		<< "\n\trvalue reference - " << std::is_rvalue_reference<T>::value << '\n';
}

int main()
{
	std::cout << "How on Earth that is_rvalue_reference and is_lvalue_reference work?!\n";
	int intval{ 123 };	int& intref{ intval };	int const&& intrref{ 123 };
	tester(intval);		tester(intref);			tester(intrref);										// not a single true, thats wrong somehow
	tester(std::move(intval));		tester(std::move(intref));		tester(std::move(intrref));
	
	
	
	return 0;
}