473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Big annoyance in TR1

Best wishes for 2008!

After studying the fine print
for the "Next Big Thing (tm)"
I *still* found no word about
one big issue, the "raw string"
or "verbatim string" etc.

Whats so complicated with this
little detail? After working
a while with the Boost::Regex
(which goes into TR1), I have
to say - it's like to repaper a
room through the keyhole in it's
door - i end up writing and testing
the regular expression in Perl and
converting the result then by doubling
it's length by added backslashes - to
C++ strings.

Maybe somebody can enlighten me
whats wrong with raw strings
(as every other single language
of some importance nowadays has
them).

What about

char stuff[] = R' this is verbatim (\s* \w+ \s* $)';
Thanks and regards

Mirco

Dec 31 '07 #1
1 1061
On Dec 31 2007, 5:55 pm, Mirco Wahab <wahab-m...@gmx.dewrote:
After studying the fine print
for the "Next Big Thing (tm)"
I *still* found no word about
one big issue, the "raw string"
or "verbatim string" etc.
Whats so complicated with this
little detail? After working
a while with the Boost::Regex
(which goes into TR1), I have
to say - it's like to repaper a
room through the keyhole in it's
door - i end up writing and testing
the regular expression in Perl and
converting the result then by doubling
it's length by added backslashes - to
C++ strings.
The TR was purely library, and didn't consider any changes to
the basic language. The current draft has nothing less than 10
different types of string literal, including 5 for raw strings.
Basically (if I've understood correctly):

escapes
prefix recognized type encoding

<nothing yes char impl. def.
u8 yes char UTF-8
u yes char16_t UTF-16
U yes char32_t UTF-32
L yes wchar_t impl. def.
R no char impl. def.
u8R no char UTF-8
uR no char16_t UTF-16
UR no char32_t UTF-32
LR no wchar_t impl. def.

This was only really integrated into the draft in the last year
or so, so probably isn't yet implemented in very many, if any
compilers. (In an ideal world, only the u8 and U variants would
be used. But history can't be ignored.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jan 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jegenye 2001 Bt | last post by:
Caveat: Python 2.2.2 (#37, Oct 14 2002, 17:02:34) Type "help", "copyright", "credits" or "l >>> l = >>> l 2 >>> l.__getitem__(1) 2 >>> l.__getitem__(slice(1))
8
by: caroundw5h | last post by:
PEP 292 adds a Template class to the string module that uses "$" to indicate a substitution. Template is a subclass of the built-in Unicode type, so the result is always a Unicode string: >>>...
0
by: Bloody Viking | last post by:
I've got an XSLT stylesheet which I've written and maintained for over 2 years now. I've always simply processed it with java org.apache.xalan.xslt.Process, but now I'm trying to speed things up,...
16
by: sloughin | last post by:
I realize that C# is a strongly typed language, but as a C++ programmer converting to C# I find the requirement that I typecast my integer enum values to be particularly annoying. Does anyone else...
5
by: Wiseguy | last post by:
consider the following: ostream_iterator<int> i(cout,""); cout << setw(3); copy(int_list.begin(),int_list.end(),i); the problem is that the field width restriction is only active for the...
0
by: PL | last post by:
It seems there is a bug or at least an annoynance with the new eventvalidation. I can't really tell you a certain way to reproduce this but I have a large datagrid that uses custom paging, I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.