louisdx / cxx-prettyprint

A header-only library for C++(0x) that allows automagic pretty-printing of any container.

Home Page:http://louisdx.github.com/cxx-prettyprint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VS November 2012 CTP cannot find operator<<

alexpolozov opened this issue · comments

I use Visual Studio November 2012 CTP. It has the best support for C++11, including variadic templates. However, for some reason default importing scheme does not work for me: when I write:

#include "prettyprint.hpp"
// ...
vector<int> v;
std::cout << v;

I get "error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::vector<int,std::allocator<_Ty>>' (or there is no acceptable conversion)".

Please let me know if the issue persists in the retail version, perhaps with more detailed errors and/or fixes. Ideally, post this on the StackOverflow post, where we have more people with MS skills.

Does the problem still exist?

Visual Studio Ultimate 2013 Update 3

#include <iostream>
#include <vector>
#include "prettyprint.hpp"
int main(int argc, char** argv)
{
    std::vector<int> v;
    std::cout << v;
}

I get this output in the console window:
http://textuploader.com/ofdz

vs2019:
std::vectorstd::string> v;
cout << v << endl;
C2678: binary '<<': no operator found which takes a left-hand operand of type 'std::basic_ostream...