Web lists-archives.com

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

I'm using MInGW 4.8.1 which gives me issues with class constructors. For example, 

class Punct_stream{
Punct_stream(istream& is) : source{is}, sensitive{true} {}
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>'

My main question is does this compile correctly in 4.9.3 and if so how do I go about moving from 4.8.1 to 4.9.3? 

-Clayton Weaver
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
MinGW-users mailing list

This list observes the Etiquette found at 
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:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe