The standard C++ has major, and I mean MAJOR draw-back!!
It cannot handle any other stream format that ASCII. 1988 standards in 2015? I 
cannot believe it!!
I am sure that there are 3rd or 4th party libraries that can handle this issue, 
but than again, that is that... a 3rd || 4th party library.
I am sure that the Win64 API has a way to handle this, if not, those guys at 
boost seem to be very smart and provably have solved the problem in a way that 
is portable.

Thanks for the help Ruben.

From: [email protected]
Sent: Monday, June 29, 2015 5:20 AM
To: [email protected]
Subject: [Mingw-w64-public] no function forstd::ifstream<wchar_t>::open(const 
wchar_t*)?

Nice, thank you, I took your advice. I have now modify the code. I have other 
problems, though.
This code:
std::wifstream infile;
infile.open( getFileName().c_str() );

error: no matching function for call to 
'std::basic_ifstream<wchar_t>::open(const wchar_t*)'


I found this discussion
http://stackoverflow.com/questions/821873/how-to-open-an-stdfstream-ofstream-or-ifstream-with-a-unicode-filename

It is a bit old, but I think it's still concurrent with today's reality and 
although the answers are very much correct I am left with the same question as 
the OP -> are there no any options if MinGw compiler is used?


I have changed the subject of this email to better reflect my predicament

From: Ruben Van Boxem
Sent: Monday, June 29, 2015 4:10 AM
To: [email protected]
Subject: Re: [Mingw-w64-public] throw(...) in MinGW

2015-06-29 9:54 GMT+02:00 <[email protected]>:

  Thanks Ruben for the help.
  To answer your question, yes, I am.
  I was also using -std=gnu++14. However, I am now compiling only with 
–std::c++11, but to no avail.

This is a microsoft extension, as Clang informs us:
http://coliru.stacked-crooked.com/a/49f77148f1e54ba7


There is probably no way to convert this, other than to just remove it.
Reading the Microsoft documentation, it seems all this construct does is inform 
the compiler the function in question can throw an exception.

That sounds quite useless to me IMHO.

Just remove it, or ifdef a THROWS macro or some such.


Cheers,


Ruben



  From: Ruben Van Boxem
  Sent: Monday, June 29, 2015 2:27 AM
  To: [email protected]
  Subject: Re: [Mingw-w64-public] throw(...) in MinGW

  Op 29-jun.-2015 07:32 schreef <[email protected]>:
  >
  > In VS2013, I declare the member functions like this:
  > void setString(const std::wstring& _str) throw(...);
  >
  > But now that I am switching to MinGW, I get a complain from the compiler 
saying:
  > error: expected type-specifier before '...' token
  > throw(...) {
  >
  > How can I fix this problem?

  Are you compiling in C++11 mode? Add -std=c++11 to your commandline 
invocation.

  Ruben

  >
  > Thanks
  >
  >
  > ________________________________
  >
  > This email has been checked for viruses by Avast antivirus software.
  > www.avast.com
  >
  >
  >
  > 
------------------------------------------------------------------------------
  > Monitor 25 network devices or servers for free with OpManager!
  > OpManager is web-based network management software that monitors
  > network devices and physical & virtual servers, alerts via email & sms
  > for fault. Monitor 25 devices for free with no restriction. Download now
  > http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
  > _______________________________________________
  > Mingw-w64-public mailing list
  > [email protected]
  > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
  >



------------------------------------------------------------------------------
  ------------------------------------------------------------------------------
  Monitor 25 network devices or servers for free with OpManager!
  OpManager is web-based network management software that monitors
  network devices and physical & virtual servers, alerts via email & sms
  for fault. Monitor 25 devices for free with no restriction. Download now
  http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
------------------------------------------------------------------------------
  _______________________________________________
  Mingw-w64-public mailing list
  [email protected]
  https://lists.sourceforge.net/lists/listinfo/mingw-w64-public




------------------------------------------------------------------------------
          This email has been checked for viruses by Avast antivirus software.
        www.avast.com




  ------------------------------------------------------------------------------
  Monitor 25 network devices or servers for free with OpManager!
  OpManager is web-based network management software that monitors
  network devices and physical & virtual servers, alerts via email & sms
  for fault. Monitor 25 devices for free with no restriction. Download now
  http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
  _______________________________________________
  Mingw-w64-public mailing list
  [email protected]
  https://lists.sourceforge.net/lists/listinfo/mingw-w64-public





--------------------------------------------------------------------------------
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


--------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public




--------------------------------------------------------------------------------
        This email has been checked for viruses by Avast antivirus software.
      www.avast.com





--------------------------------------------------------------------------------
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


--------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to