|
-
April 25th, 2009, 09:16 PM
#5
Re: Problems Using New Types
 Originally Posted by Speedo
It is const, in exactly the manner you asked for it to be. You're trying to assume that typedefs are simply text substitutions - they aren't. And needless to say, trying to argue that something is stupid just because it doesn't work like you want it to work is, well, a bit stupid.
I want something const, so I put const in front of it. Why else would it be there? I don't care if it overwrites the constness of the type used. When someone explicitly says something, it should explicitly happen. So, yes, how it is setup is stupid. It has nothing to do with thinking it's a text substitution. It has everything to do with explicit, predictable semantic behavior
btw, solved this by making separate types for const (i.e. for cstring it was : typedef const char * const c_cstring_c; ) A bit sloppy in my oppinion, but it works
Last edited by Etherous; April 25th, 2009 at 09:45 PM.
Intel Core Duo Macbook w/ Mac OS 10.5.6
gcc 4.2.1 (i386-apple-darwin9.1.0) and Xcode 3.1.1
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|