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

template<bool IsVector = true>
struct Bar {
	template<typename In>
	static auto foo(In input) {
		return input[0];
	}
};
template<>
struct Bar<false> {
	template<typename In>
	static auto foo(In input) {
		return input;
	}
};

int main() {
	cout << Bar<true>::foo(std::vector<double>{{1, 2 , 3}}) << endl;
	cout << Bar<false>::foo(4.5) << endl;
	return 0;
}