Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #89160 > unrolled thread
| Started by | Muttley@dastardlyhq.com |
|---|---|
| First post | 2023-02-20 16:45 +0000 |
| Last post | 2023-02-21 08:15 -0800 |
| Articles | 20 on this page of 203 — 22 participants |
Back to article view | Back to comp.lang.c++
Is this safe? Muttley@dastardlyhq.com - 2023-02-20 16:45 +0000
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-20 18:34 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-20 11:16 -0800
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-20 21:39 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-20 12:56 -0800
Re: Is this safe? Tony Oliver <guinness.tony@gmail.com> - 2023-02-20 16:17 -0800
Re: Is this safe? Manu Raju <MR@invalid.invalid> - 2023-02-21 01:57 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:15 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 12:31 +0200
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-21 05:36 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-21 02:19 -0800
Re: Is this safe? Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-21 14:16 +0100
Re: Is this safe? Ralf Goertz <me@myprovider.invalid> - 2023-02-21 14:40 +0100
Re: Is this safe? Chris Vine <vine24683579@gmail.com> - 2023-02-21 05:51 -0800
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 15:58 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 14:55 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 19:02 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 17:13 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 19:58 +0200
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-02-21 12:15 -0800
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-21 23:41 +0200
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-03 12:57 -0800
Re: Is this safe? Tony Oliver <guinness.tony@gmail.com> - 2023-02-20 16:14 -0800
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-20 23:48 -0500
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-21 00:05 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:14 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-20 21:18 -0500
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-20 20:38 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 09:18 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-21 15:12 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-21 14:53 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-21 10:35 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-22 09:25 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-22 22:33 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:25 +0000
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 07:05 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-22 21:21 -0800
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 09:39 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:35 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 12:30 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 10:34 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 13:20 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:00 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 18:24 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:28 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 19:01 +0200
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-23 11:57 -0500
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-23 19:12 +0200
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-23 11:57 -0500
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 12:20 -0500
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-24 02:15 +0000
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-24 15:24 -0800
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 02:14 -0500
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 07:18 -0500
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:01 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 11:50 -0500
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:41 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 19:44 +0100
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 15:02 +0100
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-23 14:49 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 16:25 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:10 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-23 20:46 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 20:05 +0000
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:48 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 22:12 -0500
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 10:49 +0200
Re: Is this safe? Ralf Fassel <ralfixx@gmx.de> - 2023-02-24 11:36 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-24 15:39 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 10:29 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 17:20 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 17:09 +0000
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-24 17:32 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 11:56 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 16:04 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 15:47 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 19:13 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-25 19:00 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 08:43 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 10:31 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-25 16:40 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 18:42 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 11:58 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 16:25 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-25 15:45 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-25 19:15 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 08:44 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 10:40 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-27 10:24 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-27 18:31 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 08:38 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-28 01:33 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 10:17 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-28 02:43 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:50 +0100
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 03:19 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 08:10 -0500
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 05:42 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 09:39 -0500
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 07:12 -0800
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-28 11:29 -0500
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:45 +0100
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-02-28 11:31 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 20:59 +0100
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-01 14:29 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 16:37 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-28 15:56 +0000
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-28 18:34 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-01 09:37 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-01 02:29 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 19:56 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-01 12:53 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 21:13 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-02 01:48 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-03 21:44 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-03 20:16 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-04 22:55 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 07:11 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-05 20:44 +0000
Re: Is this safe? Mr Flibble <flibble2@reddwarf.jmc.corp> - 2023-03-05 21:00 +0000
Re: Is this safe? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-03-05 13:59 -0800
Re: Is this safe? Mr Flibble <flibble2@reddwarf.jmc.corp> - 2023-03-05 23:07 +0000
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-06 00:22 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 14:26 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-06 00:51 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-06 02:17 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-03-05 08:13 -0800
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-05 09:05 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-03-14 09:47 -0700
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-03-01 14:40 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:07 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-03-01 21:37 -0500
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-01 22:30 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-01 14:27 +0100
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-03-01 10:48 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-02 10:29 +0100
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-01 19:53 +0000
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:08 +0000
Re: Is this safe? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-03-02 01:32 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 09:56 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-02 04:02 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-03-02 15:00 +0100
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-03-02 07:59 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-02 15:38 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-02 11:16 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-02 11:08 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-03-03 09:53 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-03-04 06:47 -0800
Re: Is this safe? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-03-02 19:35 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-28 17:40 +0100
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 12:16 -0500
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 18:39 +0100
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-24 10:03 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 19:59 +0100
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-25 06:47 +0100
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-25 10:23 +0200
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 07:16 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:31 -0800
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-23 16:34 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 16:15 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-24 12:17 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 12:24 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 15:18 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 15:55 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 18:20 +0200
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 17:05 +0000
Re: Is this safe? Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-24 19:24 +0200
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-24 09:46 -0800
Re: Is this safe? David Brown <david.brown@hesbynett.no> - 2023-02-24 17:30 +0100
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:12 +0000
Re: Is this safe? Öö Tiib <ootiib@hot.ee> - 2023-02-23 02:47 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 15:59 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 11:55 -0500
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 08:37 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 14:19 -0800
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:09 +0000
Re: Is this safe? Richard Damon <Richard@Damon-Family.org> - 2023-02-23 12:21 -0500
Re: Is this safe? scott@slp53.sl.home (Scott Lurndal) - 2023-02-23 17:55 +0000
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 13:57 -0800
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-23 17:28 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 21:44 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-24 08:48 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-21 10:58 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-22 09:26 +0000
Re: Is this safe? "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-02-22 22:34 +0100
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:29 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 08:28 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 17:16 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 22:24 -0800
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-22 21:30 -0800
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-23 09:31 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-23 22:00 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-23 22:20 -0800
Re: Is this safe? James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-24 01:34 -0500
Re: Is this safe? Muttley@dastardlyhq.com - 2023-02-24 10:32 +0000
Re: Is this safe? "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2023-02-25 00:19 -0800
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-22 08:09 -0800
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 22:32 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-22 08:32 -0800
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-22 09:17 -0800
Re: Is this safe? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-04-04 23:28 -0700
Re: Is this safe? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-04-05 11:08 -0700
Re: Is this safe? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 08:15 -0800
Page 1 of 11 [1] 2 3 … 11 Next page →
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-20 16:45 +0000 |
| Subject | Is this safe? |
| Message-ID | <tt083h$qh3d$1@dont-email.me> |
It occured to me that I don't actually know the answer. It works, but will it always work? Could it crash certain string implementations? std::string s = "hello"; for(auto &c: s) c = toupper(c); std::cout << s << std::endl;
[toc] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2023-02-20 18:34 +0100 |
| Message-ID | <tt0at1$qqeu$1@dont-email.me> |
| In reply to | #89160 |
Am 20.02.2023 um 17:45 schrieb Muttley@dastardlyhq.com: > It occured to me that I don't actually know the answer. It works, but > will it always work? Could it crash certain string implementations? > std::string s = "hello"; > for(auto &c: s) c = toupper(c); > std::cout << s << std::endl; Why should this not work ?
[toc] | [prev] | [next] | [standalone]
| From | Chris Vine <vine24683579@gmail.com> |
|---|---|
| Date | 2023-02-20 11:16 -0800 |
| Message-ID | <38f1e0aa-bff0-47d9-bbf9-148cf4a91d7cn@googlegroups.com> |
| In reply to | #89161 |
On Monday, 20 February 2023 at 17:33:38 UTC, Bonita Montero wrote: > Am 20.02.2023 um 17:45 schrieb Mut...@dastardlyhq.com: > > It occured to me that I don't actually know the answer. It works, but > > will it always work? Could it crash certain string implementations? > > std::string s = "hello"; > > for(auto &c: s) c = toupper(c); > > std::cout << s << std::endl; > Why should this not work ? The problem is that UTF-8 is now more or less ubiquitous for narrow strings and std::toupper only works for UTF-8 strings guaranteed to be in the ASCII subset. Apart from the fact that in UTF-8, any one unicode code point can require between 1 and 5 bytes (code units) to encode it, upper and lower case representations can occupy different numbers of code points. Since you are in Germany, one example is the esszet (ß), which is one code point in lower case but two code points in upper case (SS or SZ) by old/traditional orthography.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2023-02-20 21:39 +0100 |
| Message-ID | <tt0ln0$s0dj$1@dont-email.me> |
| In reply to | #89162 |
Am 20.02.2023 um 20:16 schrieb Chris Vine: > The problem is that UTF-8 is now more or less ubiquitous for narrow > strings and std::toupper only works for UTF-8 strings guaranteed to > be in the ASCII subset. Muttley didn't talk about UTF-8. But toupper() also works with UTF-8.
[toc] | [prev] | [next] | [standalone]
| From | Chris Vine <vine24683579@gmail.com> |
|---|---|
| Date | 2023-02-20 12:56 -0800 |
| Message-ID | <cb060e82-7b93-474f-a7b9-f5dcb13c802en@googlegroups.com> |
| In reply to | #89163 |
On Monday, 20 February 2023 at 20:38:09 UTC, Bonita Montero wrote: > Am 20.02.2023 um 20:16 schrieb Chris Vine: > > > The problem is that UTF-8 is now more or less ubiquitous for narrow > > strings and std::toupper only works for UTF-8 strings guaranteed to > > be in the ASCII subset. > ... But toupper() also works with UTF-8. You are ill informed. It only works for the ASCII subset of UTF-8.
[toc] | [prev] | [next] | [standalone]
| From | Tony Oliver <guinness.tony@gmail.com> |
|---|---|
| Date | 2023-02-20 16:17 -0800 |
| Message-ID | <58d1b0ec-ee6b-441d-8611-2914d21269e4n@googlegroups.com> |
| In reply to | #89164 |
On Monday, 20 February 2023 at 20:57:05 UTC, Chris Vine wrote: > On Monday, 20 February 2023 at 20:38:09 UTC, Bonita Montero wrote: > > Am 20.02.2023 um 20:16 schrieb Chris Vine: > > > > > The problem is that UTF-8 is now more or less ubiquitous for narrow > > > strings and std::toupper only works for UTF-8 strings guaranteed to > > > be in the ASCII subset. > > ... But toupper() also works with UTF-8. > > You are ill informed. It only works for the ASCII subset of UTF-8. And the example given in the OP is, indeed, ASCII. Again, why are you (irrelevantly) bringing UTF-8 into this?
[toc] | [prev] | [next] | [standalone]
| From | Manu Raju <MR@invalid.invalid> |
|---|---|
| Date | 2023-02-21 01:57 +0000 |
| Message-ID | <tt18im$ttdu$1@dont-email.me> |
| In reply to | #89166 |
On 21/02/2023 00:17, Tony Oliver wrote: > > > Again, why are you (irrelevantly) bringing UTF-8 into this? The question was about "is this safe" and Chris told him indirectly that it is not safe because it doesn't work in full set of UTF-8. The OP might not even have thought of UTF-8 but answer has to be given to the question asked.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-21 09:15 +0000 |
| Message-ID | <tt2237$13fgc$1@dont-email.me> |
| In reply to | #89167 |
On Tue, 21 Feb 2023 01:57:15 +0000 Manu Raju <MR@invalid.invalid> wrote: >On 21/02/2023 00:17, Tony Oliver wrote: >> >> >> Again, why are you (irrelevantly) bringing UTF-8 into this? > >The question was about "is this safe" and Chris told him indirectly that >it is not safe because it doesn't work in full set of UTF-8. The OP >might not even have thought of UTF-8 but answer has to be given to >the question asked. I was concerned whether the code would corrupt the string or crash the program. I couldn't give a f**k about UTF8.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Date | 2023-02-21 12:31 +0200 |
| Message-ID | <tt26ho$13qd9$1@dont-email.me> |
| In reply to | #89174 |
21.02.2023 11:15 Muttley@dastardlyhq.com kirjutas: > On Tue, 21 Feb 2023 01:57:15 +0000 > Manu Raju <MR@invalid.invalid> wrote: >> On 21/02/2023 00:17, Tony Oliver wrote: >>> >>> >>> Again, why are you (irrelevantly) bringing UTF-8 into this? >> >> The question was about "is this safe" and Chris told him indirectly that >> it is not safe because it doesn't work in full set of UTF-8. The OP >> might not even have thought of UTF-8 but answer has to be given to >> the question asked. > > I was concerned whether the code would corrupt the string or crash the > program. I couldn't give a f**k about UTF8. We understood that. Alas, there is no need for such concerns, a std::string owns its own memory and does not wrap any external memory. So we are having fun by nitpicking unrelated aspects. FYI: for wrapping there is std::string_view, but your example would not compile with s/string/string_view/.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2023-02-21 05:36 +0100 |
| Message-ID | <tt1hla$11hne$1@dont-email.me> |
| In reply to | #89164 |
Am 20.02.2023 um 21:56 schrieb Chris Vine: > > You are ill informed. It only works for the ASCII subset of UTF-8. toupper only applies to a - z and thereby works with UTF-8.
[toc] | [prev] | [next] | [standalone]
| From | Chris Vine <vine24683579@gmail.com> |
|---|---|
| Date | 2023-02-21 02:19 -0800 |
| Message-ID | <5e84ad99-8771-4508-a7a0-d07d623024b3n@googlegroups.com> |
| In reply to | #89169 |
On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: > toupper only applies to a - z ... That's wrong. Its behaviour is locale specific, and for example with a locale which uses the ISO-8859-1 codeset, will work for lower case characters outside the a-z range which have an upper case ISO-8859-1 representation.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2023-02-21 14:16 +0100 |
| Message-ID | <tt2g4q$15589$1@dont-email.me> |
| In reply to | #89176 |
Am 21.02.2023 um 11:19 schrieb Chris Vine: > On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: >> toupper only applies to a - z ... > That's wrong. Its behaviour is locale specific, ... This ... template< class CharT > CharT toupper( CharT ch, const locale& loc ); ... is locale-specific, not C's toupper.
[toc] | [prev] | [next] | [standalone]
| From | Ralf Goertz <me@myprovider.invalid> |
|---|---|
| Date | 2023-02-21 14:40 +0100 |
| Message-ID | <tt2hjo$140ee$2@dont-email.me> |
| In reply to | #89178 |
Am Tue, 21 Feb 2023 14:16:23 +0100
schrieb Bonita Montero <Bonita.Montero@gmail.com>:
> Am 21.02.2023 um 11:19 schrieb Chris Vine:
>
> > On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote:
> >
>
> >> toupper only applies to a - z ...
>
> > That's wrong. Its behaviour is locale specific, ...
>
> This ...
>
> template< class CharT >
> CharT toupper( CharT ch, const locale& loc );
>
> ... is locale-specific, not C's toupper.
“man toupper” disagrees:
NAME
toupper, toupper_l — transliterate lowercase characters
to uppercase
SYNOPSIS
#include <ctype.h>
int toupper(int c);
int toupper_l(int c, locale_t locale);
DESCRIPTION
For toupper(): The functionality described on this ref-
erence page is aligned with the ISO C standard. Any con-
flict between the requirements described here and the
ISO C standard is unintentional. This volume of
POSIX.1‐2017 defers to the ISO C standard.
The toupper() and toupper_l() functions have as a domain
a type int, the value of which is representable as an
unsigned char or the value of EOF. If the argument has
any other value, the behavior is undefined.
If the argument of toupper() or toupper_l() represents a
lowercase letter, and there exists a corresponding up-
percase letter as defined by character type information
in the current locale or in the locale represented by
locale, respectively (category LC_CTYPE), the result
shall be the corresponding uppercase letter.
…
[toc] | [prev] | [next] | [standalone]
| From | Chris Vine <vine24683579@gmail.com> |
|---|---|
| Date | 2023-02-21 05:51 -0800 |
| Message-ID | <2619af0e-3b68-47b0-b8ec-f630976171aen@googlegroups.com> |
| In reply to | #89178 |
On Tuesday, 21 February 2023 at 13:15:22 UTC, Bonita Montero wrote: > Am 21.02.2023 um 11:19 schrieb Chris Vine: > > On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: > > >> toupper only applies to a - z ... > > That's wrong. Its behaviour is locale specific, ... > > This ... > > template< class CharT > > CharT toupper( CharT ch, const locale& loc ); > > ... is locale-specific, not C's toupper. No. Here is what the standard says about toupper in <cctype>: [cctype.syn]/1: "The contents and meaning of the header <cctype> are the same as the C standard library header <ctype.h>." C11, 7.4.2.2/3, the toupper function: "If the argument is a character for which islower is true and there are one or more corresponding characters, as specified by the current locale, for which isupper is true, the toupper function returns one of the corresponding characters (always the same one for any given locale) ..." I don't have a more recent version of the C standard standard but I doubt it has changed.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Date | 2023-02-21 15:58 +0200 |
| Message-ID | <tt2ilt$15br9$1@dont-email.me> |
| In reply to | #89178 |
21.02.2023 15:16 Bonita Montero kirjutas: > Am 21.02.2023 um 11:19 schrieb Chris Vine: > >> On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: > >>> toupper only applies to a - z ... > >> That's wrong. Its behaviour is locale specific, ... > > This ... > > template< class CharT > > CharT toupper( CharT ch, const locale& loc ); > > ... is locale-specific, not C's toupper. Seriously? A major headache with C is that a lot of functions like toupper() or sprintf() are locale-specific, but the locale is unpredictable and uncontrollable for library code loaded in a multithreaded process.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-21 14:55 +0000 |
| Message-ID | <tt2m0l$15p4s$1@dont-email.me> |
| In reply to | #89181 |
On Tue, 21 Feb 2023 15:58:21 +0200 Paavo Helde <eesnimi@osa.pri.ee> wrote: >21.02.2023 15:16 Bonita Montero kirjutas: >> Am 21.02.2023 um 11:19 schrieb Chris Vine: >> >>> On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: >> >>>> toupper only applies to a - z ... >> >>> That's wrong. Its behaviour is locale specific, ... >> >> This ... >> >> template< class CharT > >> CharT toupper( CharT ch, const locale& loc ); >> >> ... is locale-specific, not C's toupper. > >Seriously? A major headache with C is that a lot of functions like >toupper() or sprintf() are locale-specific, but the locale is >unpredictable and uncontrollable for library code loaded in a >multithreaded process. Why would multithreading make any difference? Enviroment variables such as LC_TYPE are process wide.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Date | 2023-02-21 19:02 +0200 |
| Message-ID | <tt2tfb$16gu3$1@dont-email.me> |
| In reply to | #89184 |
21.02.2023 16:55 Muttley@dastardlyhq.com kirjutas: > On Tue, 21 Feb 2023 15:58:21 +0200 > Paavo Helde <eesnimi@osa.pri.ee> wrote: >> 21.02.2023 15:16 Bonita Montero kirjutas: >>> Am 21.02.2023 um 11:19 schrieb Chris Vine: >>> >>>> On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: >>> >>>>> toupper only applies to a - z ... >>> >>>> That's wrong. Its behaviour is locale specific, ... >>> >>> This ... >>> >>> template< class CharT > >>> CharT toupper( CharT ch, const locale& loc ); >>> >>> ... is locale-specific, not C's toupper. >> >> Seriously? A major headache with C is that a lot of functions like >> toupper() or sprintf() are locale-specific, but the locale is >> unpredictable and uncontrollable for library code loaded in a >> multithreaded process. > > Why would multithreading make any difference? Enviroment variables such as > LC_TYPE are process wide. Exactly. The locale is process wide, so whenever I want to do something which might require a different locale than the current process-wide locale (e.g. producing CSV/XML/JSON files, formatting program code, etc), I cannot use any functions like toupper() or sprintf() which use the process-wide locale. I cannot also use setlocale() because this might disturb other threads. There are alternative functions where one can specify the locale explicitly, typically ending with the "_l" suffix, but these are relative late-comers and not so universally supported. On Windows the names tend to be different, which complicates the things further. The locale-dependent functions tend to be quite slow anyway. In C++ we finally have some fast formatting support like std::to_chars(), but this was a long wait. The locale concept originates from 40 years back where it was assumed that all information in text format is meant for visual consumption by a human sitting near the same machine. This is not the case already for a long time. Not to speak about that the locale mechanisms are nowhere near up to the task for supporting real i22n.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2023-02-21 17:13 +0000 |
| Message-ID | <tt2u4d$16jf0$1@dont-email.me> |
| In reply to | #89186 |
On Tue, 21 Feb 2023 19:02:33 +0200 Paavo Helde <eesnimi@osa.pri.ee> wrote: >21.02.2023 16:55 Muttley@dastardlyhq.com kirjutas: >> On Tue, 21 Feb 2023 15:58:21 +0200 >> Paavo Helde <eesnimi@osa.pri.ee> wrote: >>> 21.02.2023 15:16 Bonita Montero kirjutas: >>>> Am 21.02.2023 um 11:19 schrieb Chris Vine: >>>> >>>>> On Tuesday, 21 February 2023 at 04:35:06 UTC, Bonita Montero wrote: >>>> >>>>>> toupper only applies to a - z ... >>>> >>>>> That's wrong. Its behaviour is locale specific, ... >>>> >>>> This ... >>>> >>>> template< class CharT > >>>> CharT toupper( CharT ch, const locale& loc ); >>>> >>>> ... is locale-specific, not C's toupper. >>> >>> Seriously? A major headache with C is that a lot of functions like >>> toupper() or sprintf() are locale-specific, but the locale is >>> unpredictable and uncontrollable for library code loaded in a >>> multithreaded process. >> >> Why would multithreading make any difference? Enviroment variables such as >> LC_TYPE are process wide. > >Exactly. The locale is process wide, so whenever I want to do something >which might require a different locale than the current process-wide >locale (e.g. producing CSV/XML/JSON files, formatting program code, >etc), I cannot use any functions like toupper() or sprintf() which use >the process-wide locale. I cannot also use setlocale() because this >might disturb other threads. Make your program multi process then. Problem solved.
[toc] | [prev] | [next] | [standalone]
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Date | 2023-02-21 19:58 +0200 |
| Message-ID | <tt30np$16rbl$1@dont-email.me> |
| In reply to | #89188 |
21.02.2023 19:13 Muttley@dastardlyhq.com kirjutas: > > Make your program multi process then. Problem solved. Too late. Nowadays I'm happy if there are less than 100 threads in the process, otherwise debugging them might become really tedious.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2023-02-21 12:15 -0800 |
| Message-ID | <tt38pg$17kkf$1@dont-email.me> |
| In reply to | #89192 |
On 2/21/2023 9:58 AM, Paavo Helde wrote: > 21.02.2023 19:13 Muttley@dastardlyhq.com kirjutas: >> >> Make your program multi process then. Problem solved. > > Too late. Nowadays I'm happy if there are less than 100 threads in the > process, otherwise debugging them might become really tedious. > > > 100 threads? I am wondering what they are all doing. ;^)
[toc] | [prev] | [next] | [standalone]
Page 1 of 11 [1] 2 3 … 11 Next page →
Back to top | Article view | comp.lang.c++
csiph-web