The standard library also comes with codecvt classes for using UTF, although I just use my own UTF string class. Unicode is a huge standard when you include normalization, collation, character properties, etc, but the UTF part is pretty straight forward.
Although I certainly wish u8 strings and narrow strings had a different type.
Announcement
Collapse
No announcement yet.
Features You Should Be Able To Find In C++14
Collapse
X
-
Originally posted by erendorn View PostMostly, there's no compartmentalization between different includes.
Like, including windows.h will break your template definition using std::min, and things like that.
The include directive includes the actual code, while what you want most of the time is importing the definitions, sandboxed from one another.
See these slides for more thoughts on the subject:
http://llvm.org/devmtg/2012-11/Gregor-Modules.pdf
#include <windows.h> usually breaks any piece of software!
Leave a comment:
-
Originally posted by wizard69 View PostWhat is wrong with header files? The need to guard against multiple inclusions is a pain but honestly the compilers should be required to deal with that problem not the programmer.
Like, including windows.h will break your template definition using std::min, and things like that.
The include directive includes the actual code, while what you want most of the time is importing the definitions, sandboxed from one another.
See these slides for more thoughts on the subject:
http://llvm.org/devmtg/2012-11/Gregor-Modules.pdf
Leave a comment:
-
Originally posted by wizard69 View PostDoes anybody have a usable solution? Unicode was one of those designed by committee things that will always be a struggle to implement and more importantly put into use.
Or u16string. Though you may need to bind with ICU yourself to get a copy of all the insanity required to deal with unicode according to standard.
Leave a comment:
-
Originally posted by mirza View PostFirst thing they shoud do, is get rid of header and lib files (soooo '70 hippie style),
ane move to something sane, like AT LEAST package / .JAR files in java.
Actually no, it is already too late. Vast majority of developers followed Android and Java away from C.
C/C++ is now language for kernel, and system things sitting next to kernel. And for enthusiasts. World moved on in the meantime.
Leave a comment:
-
Originally posted by zoomblab View PostModules are not going to make header files to go away. Unlike Java the C compiler can not read the declarations from the binary (that would require a portable binary standard) or the implementation files.
Leave a comment:
-
Originally posted by Ericg View PostRead the blogpost before you comment. Modules were tried to get ready for C++14 but they didn't make the deadline. They've been pushed back to C++17, which the developers think is more than enough time.
Leave a comment:
-
Originally posted by mark45 View PostYour example has nothing to do with what I said.
http://stackoverflow.com/questions/1...pported-in-c11
http://cppwhispers.blogspot.com/2012...on-3-of-n.html
Leave a comment:
-
Originally posted by zanny View PostCode:#include <iostream> #include <string> int main() { std::string str { u8"Unicode characters: ◧ ◬ ☎ ♾ ⚠ ☔\n" }; std::cout << str << std::endl; }
What is the problem?
http://stackoverflow.com/questions/17103925/how-well-is-unicode-supported-in-c11
http://cppwhispers.blogspot.com/2012/11/unicode-and-your-application-3-of-n.html
Leave a comment:
Leave a comment: