Re: [OCLUG-Tech] why does g++ not issue a narrowing error?

2018-02-03 Thread Robert P. J. Day
On Sat, 3 Feb 2018, Stephen M. Webb wrote: > On 2018-02-03 04:52 AM, Robert P. J. Day wrote: > > > > currently rewriting my C++ courses from some time back, and wanted > > to demonstrate a simply narrowing error; to wit: > > > > int > > main() > > { > > bool b1 {true}; > > bool b

Re: [OCLUG-Tech] why does g++ not issue a narrowing error?

2018-02-03 Thread Stephen M. Webb
On 2018-02-03 04:52 AM, Robert P. J. Day wrote: > > currently rewriting my C++ courses from some time back, and wanted > to demonstrate a simply narrowing error; to wit: > > int > main() > { > bool b1 {true}; > bool b2 {false}; > bool b3 {7};// narrowing error? > >

[OCLUG-Tech] why does g++ not issue a narrowing error?

2018-02-03 Thread Robert P. J. Day
currently rewriting my C++ courses from some time back, and wanted to demonstrate a simply narrowing error; to wit: int main() { bool b1 {true}; bool b2 {false}; bool b3 {7};// narrowing error? int i {42}; int j {42.1}; // narrowing error? } odd