Can anyone say why I get this error message that indicates that it has been defined twice?
The functions in question are two operators defined inline in the class:

Code:
template<typename T, template<int> class thread_safety = ptr_thread_dangerous, int Bits = 32> class mad_shared_ptr
{
	//...
	template<typename lhs_t, typename rhs_t>
	friend bool operator == (const mad_shared_ptr<lhs_t>& lhs, const mad_shared_ptr<rhs_t>& rhs)
	{
		return (lhs.m_ptr == rhs.m_ptr);
	}

	template<typename lhs_t, typename rhs_t>
	friend bool operator != (const mad_shared_ptr<lhs_t>& lhs, const mad_shared_ptr<rhs_t>& rhs)
	{
		return !(lhs == rhs);
	}
//...
}
When the header containing the template class is included in two source files, it gives me these re-definition errors.
1>------ Build started, Configuration: Debug Win32 ------
1>Compiling...
1>Testing.cpp

1>Compiling...
1>CCharacter.cpp

1>mad_shared_ptr.h(130) : error C2995: 'bool operator ==(const mad_shared_ptr<lhs_t> &,const mad_shared_ptr<rhs_t> &)' : function template has already been defined
1>mad_shared_ptr.h(130) : see declaration of 'operator =='
1>ccharacter.cpp(39) : see reference to class template instantiation 'mad_shared_ptr<T>' being compiled
1> with
1> [
1> T=hgeSprite
1> ]

1>mad_shared_ptr.h(136) : error C2995: 'bool operator !=(const mad_shared_ptr<lhs_t> &,const mad_shared_ptr<rhs_t> &)' : function template has already been defined
1>mad_shared_ptr.h(136) : see declaration of 'operator !='

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Both Testing.cpp and CCharacter.cpp includes the header, and the header DOES have inclusion guards.
I can post the entire class if necessary.