C++ template class overload [] operator
===

I would like to overload the [] operator for a template class in respect with the template parameters. Like so:

    template<
    	typename T,
    	template<typename> class Property, 
    	template<typename> class Key1, 
    	template<typename> class Key2>
    class a_map 
    {
    public:
    	const Property<T>& operator[](const Key1<T>& k) const
    	{ return _values[k.index()]; }
    	const Property<T>& operator[](const Key2<T>& k) const
    	{ return _values[k.index()]; }
    protected:
    	std::vector<Property<T> > _values;
    };

I would use this class like so:

    int main()
    {
    	a_map<float, prop, key_a, key_b> pm;
    }

Basically I want to be able to access the elements inside the `_values` vector without having to worry to much about the `Key` types. All that matters is that they have an `index()` member.

However I get the following error 

> error C2535: 'const Property<T> &a_map<T,Property,Key1,Key2>::operator
> [](const Key1<T> &) const' : member function already defined or
> declared

even though `key_a` and `key_b` are two totaly different types.

Am I missing something? Is the compiler afraid that in certain situation `Key1` and `Key2` might actually be the same type?