Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Cannot compile on VS2013 which may not have full C++ 11 support #182

Open
chenzx opened this issue Dec 19, 2017 · 4 comments
Open

Cannot compile on VS2013 which may not have full C++ 11 support #182

chenzx opened this issue Dec 19, 2017 · 4 comments

Comments

@chenzx
Copy link

chenzx commented Dec 19, 2017

Here are compile errors:

Error 62 error C2227: left of '->content' must point to class/struct/union/generic type D:\repo\Simple-Web-Server\http_examples.cpp 223 1 http_examples

but the source code is in fact very simple:

  // Synchronous request examples
  try {
    auto r1 = client.request("GET", "/match/123");
    cout << r1->content.rdbuf() << endl; // Alternatively, use the convenience function r1->content.string()
@chenzx
Copy link
Author

chenzx commented Dec 19, 2017

If readme can indicate the minimal MSVS edition SWS supports, that would be nice

@chenzx
Copy link
Author

chenzx commented Dec 19, 2017

I try to modify under VS2013:

	//auto
	  std::shared_ptr<HttpClient::Response> 
		r1 = client.request("GET", "/match/123");
    cout << r1->content.rdbuf() << endl; // Alternatively, use the convenience function r1->content.string()

but still compile error:

Error 1 error C2440: 'initializing' : cannot convert from 'void' to 'std::shared_ptr<SimpleWeb::ClientBaseSimpleWeb::HTTP::Response>' D:\repo\Simple-Web-Server\http_examples.cpp 225 1 http_examples

@eidheim
Copy link
Owner

eidheim commented Dec 19, 2017

Hopefully, someone with MSVC background can answer this.

@SethHamilton
Copy link
Contributor

It works very well on MSVC 2015. Especially the newer variants. 2013 is pretty old, and likely wasn't fully compliant.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants