- Converting from int* to char* - 2 Updates
- The "STL" - 6 Updates
legalize+jeeves@mail.xmission.com (Richard): Jan 12 08:04PM [Please do not mail me a copy of your followup] "R. Schubert" <raphael.schubert@gmx.de> spake the secret code >from value and thus require value to be convertible to T, but >apparently I was mistaken. §5.2.3 (Explicit type conversion) of >N3797 even says so, I just didn't find it before. Thanks. Yeah, I used to think the same thing and then I dug into the standard and was surprised to find out it explicitly says that this is just another form of C-style cast. Now, if you had written T{value}, *that* would be an explicit construction of a value of type T initialized to value and would prohibit narrowing conversions. In a C++11 code base, I think I would prefer something like: char c = char{14}; over char c = static_cast<char>(14); -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
"Öö Tiib" <ootiib@hot.ee>: Jan 12 12:54PM -0800 On Tuesday, 12 January 2016 22:04:43 UTC+2, Richard wrote: > char c = char{14}; > over > char c = static_cast<char>(14); The characters 14 and 15 were used to change between color ribbons of prehistoric printers. Did any of those really survive until 2011? |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 12 02:38AM On Mon, 2016-01-11, Gareth Owen wrote: > Or we could say "STL" - and have everyone know what we mean - then > acknowledge that as sentient humans our use of language need not > constrained by ISO documents, and go about our day. You're right of course. Although Stefan Ram /does/ have a point: if you say "STL", sooner or later someone is going to try to correct you. I personally avoid the word for that reason. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
"Öö Tiib" <ootiib@hot.ee>: Jan 12 12:24AM -0800 On Tuesday, 12 January 2016 04:39:12 UTC+2, Jorgen Grahn wrote: > You're right of course. Although Stefan Ram /does/ have a point: if > you say "STL", sooner or later someone is going to try to correct you. > I personally avoid the word for that reason. All three-letter abbreviations that do not contain letters x, z, q or j are ambiguous as rule and so should be avoided. "STL" has such other usages that I have met: "state logic in PLC-programming", "programming language for Siemens controllers", "subtitles file format", "stereolitography file format". Also we have often to talk with specialists of other areas and there it is virtually endless what "STL" may mean for them but nothing of it has anything to do with C++. If we want to be incomprehensible for others then that is safer to achieve by being laconic or silent. Silent idiot looks most wise. ;-) |
scott@slp53.sl.home (Scott Lurndal): Jan 12 02:36PM >You're right of course. Although Stefan Ram /does/ have a point: if >you say "STL", sooner or later someone is going to try to correct you. >I personally avoid the word for that reason. Shakespeare said it best. "Much Ado About Nothing". Who cares if a pedant corrects you? |
Daniel <danielaparker@gmail.com>: Jan 12 07:07AM -0800 On Tuesday, January 12, 2016 at 9:36:29 AM UTC-5, Scott Lurndal wrote: > Shakespeare said it best. "Much Ado About Nothing". Or as they would say in Newfoundland, "Lard Tunderin' Jaysus, me b'y, ... that's plain daft." Daniel |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 12 04:24PM On Tue, 2016-01-12, Öö Tiib wrote: > "programming language for Siemens controllers", > "subtitles file format", > "stereolitography file format". For many years I thought this chain of gas stations was called "stl", but it turned out to be a logotype problem: https://en.wikipedia.org/wiki/St1 Vaguely ontopic: avoid mixing 'l' and '1', unless you know the reader has a really good font. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Gareth Owen <gwowen@gmail.com>: Jan 12 07:42PM > Shakespeare said it best. "Much Ado About Nothing". > Who cares if a pedant corrects you? In fact its helpful. If someone depends you distinguish which specific Standard Template Library you mean, its probably a good clue that you should run like hell in the other direction. |
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