#include <iostream>
#include <string>

struct player_name_tag {} PLAYER_NAME;
struct connection_timeout_tag {} CONNECTION_TIMEOUT;

template<class T>
struct constref_wrapper {
	constref_wrapper(const T& x) noexcept
	: content(x) {}
	
	const T& getValue() const noexcept {
		return content;
	}
	
	private:
	const T& content;
};

struct ResourceManager {
	static constref_wrapper<std::string> get(player_name_tag) {
		return constref_wrapper<std::string>(name);
	}
	
	static constref_wrapper<int> get(connection_timeout_tag) {
		return constref_wrapper<int>(timeout);
	}
	
	private:
	static std::string name;
	static int timeout;
};

std::string ResourceManager::name    = "Rambo";
int         ResourceManager::timeout = 100;

int main() {
	std::cout << ResourceManager::get(PLAYER_NAME).getValue() << std::endl;
	std::cout << ResourceManager::get(CONNECTION_TIMEOUT).getValue() << std::endl;
}