#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::boolalpha << 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);		// lvalue reference	
	tester(intref);		// lvalue reference		
	tester(intrref);		// lvalue reference									// not a single true, thats wrong somehow
	tester(std::move(intval));	// false
	tester(std::move(intref));	// false
	tester(std::move(intrref));	// false
	
	return 0;
}