- embedded assignment - 4 Updates
- The effectiveness of C++14 - 1 Update
- FOUND IT ! - 6 Updates
- static vector (c style) - 1 Update
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Jan 17 10:49AM -0700 On Sat, 17 Jan 2015 16:12:14 +0100, Alain Ketterlin >> instead of = >The flag is -Wparentheses but you can use -Wall for a common set of >warning flags, and add -Wextra if you want more. I recommend -Werr as well as -Wall. If you can get your code to compile with no warnings, you don't need to worry about which ones to fix and which to ignore. Louis |
agent@drrob1.com: Jan 17 02:04PM -0500 On Sat, 17 Jan 2015 10:49:49 -0700, Louis Krupp >I recommend -Werr as well as -Wall. If you can get your code to >compile with no warnings, you don't need to worry about which ones to >fix and which to ignore. Thanks guys for your help. --rob |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 17 07:08PM On Sat, 2015-01-17, Louis Krupp wrote: ... > I recommend -Werr as well as -Wall. If you can get your code to > compile with no warnings, you don't need to worry about which ones to > fix and which to ignore. I recommend /not/ using -Werror. I've lost countless hours/worked late nights because of it -- an unused function or variable causing a multi-hour compilation job to abort, when someone desperately neeed the resulting binary. The theory is that programmers are like children, and without that flag you'd have chaos: noone would care about compiler warnings and there would be thousands of them. I find that cynical: I prefer to put trust in people, and to believe most want to do a good job, and be proud of their craftmanship. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
"Öö Tiib" <ootiib@hot.ee>: Jan 17 03:19PM -0800 On Saturday, 17 January 2015 21:08:33 UTC+2, Jorgen Grahn wrote: > there would be thousands of them. I find that cynical: I prefer to > put trust in people, and to believe most want to do a good job, and be > proud of their craftmanship. I agree. It is good policy that your code-base produces no warnings. By such policy compiler warning is minor/cosmetic defect that should be cheap to fix. Also it is usually simple to see who was its author. It is pointless to turn a minor defect into show-stopper fault with -Werr. |
ram@zedat.fu-berlin.de (Stefan Ram): Jan 17 09:04PM >In 2014, C++14 was »ratified« or »adopted«. But it seems not to >have been published by the ISO yet. So, is it in effect or not? A snippet from a SERP: |ISO/IEC 14882:2015 - Information technology -- Programming ... |www.iso.org/iso/catalogue_detail.htm?csnumber=64029 |ISO/IEC 14882:2014 specifies requirements for implementations ... Can't they make up their mind whether it is »:2015« or »:2014«? But it was not published in 2014, so when the ISO, /possibly/, will manage to publish it in 2015, will it be called »ISO/IEC 14882:2015«? |
Paavo Helde <myfirstname@osa.pri.ee>: Jan 17 10:34AM -0600 > class. The template works. So if I change the operator from * to % for > example, then everything compiles. So in base class there is also * - > operator which gave troubles . Looks like you need to use explicit namespace in the friend declaration. Like ::operator* or mynamespace::operator*. hth Paavo |
JiiPee <no@notvalid.com>: Jan 17 05:09PM On 17/01/2015 16:34, Paavo Helde wrote: > Like ::operator* or mynamespace::operator*. > hth > Paavo in base class/with base class? Ok, thanks... I ll try this. |
red floyd <no.spam.here@its.invalid>: Jan 17 09:18AM -0800 On 1/17/2015 6:14 AM, JiiPee wrote: > template<typename T> > Foo<T> operator+ (const Foo<T>& lhs, const Foo<T>& rhs) > { return Foo<T>(lhs.value_ + rhs.value_); } Better, but what *ERROR* messages did you receive? |
JiiPee <no@notvalid.com>: Jan 17 05:48PM On 17/01/2015 17:18, red floyd wrote: >> Foo<T> operator+ (const Foo<T>& lhs, const Foo<T>& rhs) >> { return Foo<T>(lhs.value_ + rhs.value_); } > Better, but what *ERROR* messages did you receive? in the other post I explain that the error is related to the base class.... so if I dont inherite anything then it does compile. So this is one of these where I though the error was there but it was somewhere else (it has to do with the base class *-operation function ... they somehow conflict.... i ll check this later). |
Paavo Helde <myfirstname@osa.pri.ee>: Jan 17 12:12PM -0600 >> hth >> Paavo > in base class/with base class? Ok, thanks... I ll try this. In the friend declaration in the derived class. But as you have failed so far to post a failing code example and/or the exact error message, one cannot be sure. Cheers Paavo |
JiiPee <no@notvalid.com>: Jan 17 06:17PM On 17/01/2015 18:12, Paavo Helde wrote: > cannot be sure. > Cheers > Paavo yes true, I did not give the inheritance code. I gave the non-inheritance version which actually works... I ll check this myself ... i have not yet tried to fix the base class. I ll come back if I fail to do it. |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 17 02:29PM On Thu, 2015-01-15, jacob navia wrote: >> You're falsifying what he wrote > How could he have written about the HyperBasic team? > That's so obvious nobody would have doubted that I wrote that citation. If you quote someone and use the > convention, I'm assuming that what you're quoting is exactly what he actually wrote and what he intended to convey, modulo spacing. line breaks and the odd [...] abbreviation. That's what I learned in school, too -- quoting is a serious business. When reading that stuff, I was really confused for a while: "Does Christopher P. really hate C++? That's not the impression I got from his earlier postings." My newsreader has a "previous in thread" feature which showed me that you were misquoting him -- and it now seems now you did it on purpose. > I did not want to edit it much though, just some MINIMAL changes and the > introduction of the HyperBasic team. > I am just setting his words in the context of 35 years in the future. And that's why I'm no longer interested in seeing messages from you. I wish you all the luck, but I don't have anything to say to you from now on. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment