General C++: Unresolved reference to operator overloads

Hello List,
I please be kind, as I know this is not boost related.
Inside the header file I define the following:
/* Operator + */
std::vectorstd::uint8_t
operator+(
const std::vectorstd::uint8_t& x,
const std::vectorstd::uint8_t& y
);
/* Operator - */
std::vectorstd::uint8_t
operator-(
const std::vectorstd::uint8_t& x,
const std::vectorstd::uint8_t& y
);
And then inside the implementation CPP file I do the following:
/* Operator + */
std::vectorstd::uint8_t
operator+(
const std::vectorstd::uint8_t& x,
const std::vectorstd::uint8_t& y
) {
*obmitted for brievity*
};
/* Operator - */
std::vectorstd::uint8_t
operator-(
const std::vectorstd::uint8_t& x,
const std::vectorstd::uint8_t& y
) {
*obmitted for brievity*
};
Yet when I compile I keep on getting :
undefined reference to `operator+(std::vector

/* Operator + */ std::vectorstd::uint8_t operator+( const std::vectorstd::uint8_t& x, const std::vectorstd::uint8_t& y );
template<class Alloc> std::vectorstd::uint8_t,Alloc operator+(const std::vectorstd::uint8_t,Alloc& x,const std::vectorstd::uint8_t,Alloc& y); etc... Matthias

On 19/06/2010 17:41, Matthias Schabel wrote:
/* Operator + */ std::vectorstd::uint8_t operator+( const std::vectorstd::uint8_t& x, const std::vectorstd::uint8_t& y );
template<class Alloc> std::vectorstd::uint8_t,Alloc operator+(const std::vectorstd::uint8_t,Alloc& x,const std::vectorstd::uint8_t,Alloc& y);
etc...
Matthias _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thank you.

On 6/19/2010 11:35 AM, Etienne Philip Pretorius wrote:
Hello List,
I please be kind, as I know this is not boost related. <snip>
I will *kindly* suggest you post general C++ questions to comp.lang.c++.moderated. You'll find many kind, helpful people there, too. :) Thanks, -- Eric Niebler BoostPro Computing http://www.boostpro.com
participants (3)
-
Eric Niebler
-
Etienne Philip Pretorius
-
Matthias Schabel