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{
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>'

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.
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