Re: [Boost-users] Nindi ... Boost Variant

The operator << must be defined in the boost namespace.
See the error message of VC:see reference to function template instantiation
'std::basic_ostream<_Elem,_Traits> &boost::operator
<<
I apologise for emailing you directly .. but i canno access the mailing list from work.. However in response to your response.
The following doesn't compile either .. I get the error
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const T0' (or there is no acceptable conversion)
On VC8
#include<iostream> #include<vector> #include<string>
#include
std::basic_ostream<char> &operator<<(std::basic_ostream<char> &theostream,const std::vector<unsigned long> &theVector) { for(unsigned long i(0);i
struct TpTemplateVariant { typedef boost::variant< std::vector<unsigned long>,
int,
std::string
BoostVariant; };
typedef TpTemplateVariant::BoostVariant Tpvariant;
int main () {
Tpvariant p(5); std::cout << p;
return 0;
*********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and regulated by the Financial Services Authority
This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbos.com http://www.rbsmarkets.com ***********************************************************************************
participants (1)
-
Ovanes Markarian