Web lists-archives.com

Re: [Mingw-users] MinGW Question on versions and Class Constructors




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22/03/16 23:04, Clayton Weaver wrote:
> I'm using MInGW 4.8.1 which gives me issues with class
> constructors. For example,
> 
> class Punct_stream{ public: Punct_stream(istream& is) : source{is},
> sensitive{true} {} //... private: istream& source; // character
> source bool sensitive; // is the stream case-sensitive? };
> 
> The compiler fails with:
> 
> error: invalid initialization of non-const reference of type
> 'std::istream& {aka std::basic_istream<char>&}' from an rvalue of
> type '<brace-enclosed initializer list>'

FWIW, I see exactly the same when I compile with the native GCC-4.8.2,
on my LinuxMint Debian system, so this isn't MinGW specific; (I also
see the same with mingw32-g++ v4.8.2, on the same host).

> My main question is does this compile correctly in 4.9.3

Again on the LinuxMint host, the mingw32-g++ v4.9.3 cross-compiler,
which I used to build the GCC-4.9.3 now offered by MinGW.org, compiles
it correctly with -std=gnu++11, but not with -std=c++11; the GCC-5.3.0
cross-compiler, on which I am now working, compiles it correctly with
either option.

> and if so how do I go about moving from 4.8.1 to 4.9.3?

With mingw-get:

  mingw-get update
  mingw-get upgrade

(or the equivalent operations from the mingw-get GUI).  Right now,
this will upgrade GCC to v4.9.3; in a few days, I hope to have a
release of GCC-5.3.0 ready to go.

- -- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJW8p83AAoJEMCtNsY0flo/2DEP+gMs+oQzph4mel4k0qEfJsmO
VNo0LuNdE7/alzRhnIxvuJZMQdB0gPvuwBuBAVzkBECRBbjLUXtNSPCnH/heSGOX
wuBuvG9ZFEoRaTrXMXd9k3DRLBgA79WkouHjDeVdZVjwGKRwcXF+s9LNmR5OYkmM
G2S53e98WLpEyPBWZGPu/2vQIZcReNRTSWqljqdFE8HyuGlMNXXRDEnNfKZ2vaL6
mqPawZASuhOiMW4yvd25MHoAM0YFipPA4FvutVhrG+ZGutl51t8O0vdpkfazQtZN
edXT2VyGWfo1oe1xt8DTf1V8+q8pFoznBCAF7eNwieZIvPkCSwCh1uWBo/QxUumo
wWWpeC69eqSMXWY7LNMiaKbveBlwfGfT9Lg4+RYkghsHHIJEtwmQc5CM61SCLntX
P8QIkyDMTaOlJzi9e+CxP36MiScfKxAMlH8NV7It7DtDU488jRUDs7JFfdT9aaJw
0IcfapI3OIZ0uYlYNd/4beUZgWsMenueri9EGiDCJRxrVRbABIzYzbgfb2YAZSQ8
3n3pguwvhh/nfi/oaVPKbV5Y8Czg1flee7mbrd1GTOEHo5Kgf16kmi7TNlo3f0TJ
gM9ThfE+i5u+jtkd4Sx7XjpIUmf/WzLT8SG7Io63eaySsuAEe6NOzgoMuTwLxiYL
UYxeRhVmD8TA+iseGo5O
=ix+b
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe