« first day (96 days earlier)      last day (4854 days later) » 
00:00 - 21:0021:00 - 00:00

12:02 AM
Ha ha ha ha
.@andersoncooper gets to the scene hours after tragedies happen. @ONN creates the tragedies so we're always there first. #News
 
12:15 AM
now that 0x adds c* methods for begin, end, rbegin, and rend, if you had to do it from scratch, would you still overload the non-c* methods on const?
 
@FredNurk Maybe. Interestingly, while there are nonmember std::begin and std::end functions now, there are not std::cbegin and std::cend functions.
I think the c{begin,end} functions are most useful because they make it easier to ensure you get const iterators when using auto or decltype to automatically deduce the type of an iterator variable.
 
I can see a need for std::begin/end overloaded on const (to use c*), if the const method overloads were removed, e.g. template<class T> void f(T& container) { begin(container); }
but, given std::begin, I'm trying and failing to see why we need the const method overload
@JamesMcNellis that has always seemed more of a documentation issue
in particular, you can use auto const/* maybe with & */ var = expr; if you wanted the deduced variable to be const
but if var isn't const (and even sometimes when it is), that doesn't mean you can rely on the values of cbegin/cend not changing
that's not quite what I want to say either though; if you need to use cbegin/cend with a non-const object (such as the deduced var case) in order to change the behavior of something else, then that something else probably has a design flaw
that's closer, if it makes sense. e.g. a function overloaded on iterator and const_iterator should not be modifying data in the iterator case
and include functions templated on iterator type in that
 
12:59 AM
@FredNurk auto const it = c.begin(); is different from auto it = c.cbegin(); though. The first is a const-qualified non-const iterator while the other is a non-qualified const iterator (the difference is similar to void * const vs void const *)
 
@JamesMcNellis Hi James. Will you be running for moderator this time?
 
@karlphillip Ha. You are like the fifth person to ask me that. :-) I don't think so. I wouldn't be a particularly good moderator.
 
@JamesMcNellis Why is that? LAck of time to moderate?
 
@karlphillip Well, I'm sure I have the time, but I'd like to spend less time on Stack Overflow, not more. :-)
I managed a large (65k+ member) community before and really didn't care for the moderation tasks; I let others handle them.
 
@JamesMcNellis I see. I have some personal projects to attend to this year, but moderating SO could fit in my agenda.
@JamesMcNellis Even though my account is older, I've only been participating for the last 6 months or so. I don't stand a chance for this elections, but maybe next time.
 
1:11 AM
@karlphillip Sure. I'm just here for technical development; dealing with bickering and other people issues just isn't fun to me. :-)
 
@JamesMcNellis good point. I have to agree I'm currently more interested in technical development then moderating.
Ok I hate to go. Bye bye ppl.
 
 
5 hours later…
6:26 AM
@JamesMcNellis I know, that's not what I was aiming at. consider "auto it = c.begin();": either an iterator or a const_iterator, but if you only need a const_iterator, anything you do with an iterator should not be "accidentally" modifing the container either. in fact, I think it would be possible to change const to act like a "template<class T> T const& add_const(T const& x) { return x; }" which "moves" the 'c' in cbegin to outside: const(c).begin(), but additionally allows more general use
e.g. f(const(x)) to explicitly pass as const, though I see it getting more use with const(x).member / const(x.member)
I wonder about changing all const, volatile, ref, rvalue-ref, and pointer to functions: const(int), void f(rref(int) x);, ptr(int) x = &a[42] – especially for beginners, I wonder if it would be a more intuitive syntax
 
sbi
7:07 AM
@FredNurk I like the idea, but it doesn't always (pointers, iterators) work that easy.
 
 
1 hour later…
8:12 AM
@CharlesRay I can't believe you dragged me all the way into the chat to read that bug report.
 
 
2 hours later…
9:58 AM
how is book-exercise a synonym for "homework"?
 
How can we convince Jeff that anonymous downvotes suck?
I have the distinct impression that my older posts are systematically getting downvoted out of revenge, and just rarely enough to fly under the “cheat detection” radar
 
@KonradRudolph i think what sucks is the way no comment is required. i think anonymity for downvotes should be not just supported but encouraged (so that it's the norm). but as it is one cannot distinguish real, considered downvotes from revenge downvotes and troll downvotes
 
@Alf Well, how would you leave a comment anonymously?
Duh, just support anonymous comments for downvotes. You’re right
 
@KonradRudolph Just type it in? This is the one single case I can think of where a minimum required comment length would make sense.
 
0
Q: Non-synonyms in active synonyms-list?

Johannes Schaub - litbI found a couple of things that aren't really synonyms homework <-> book-exercise Not really synonymous. I can just ask about a homework my teacher gave me, which isn't out of a book. homework <-> programming-exercise / exercise Same reason. I can myself make me a programming exercise or...

 
 
1 hour later…
11:12 AM
01101001011001100010000001110101001000000110001101100001011011100010000001110010011001010110000101100100001000000111010001101000011010010111001100101100001000000111100101101111011101010010000001101110011001010110010101100100001000000111010001101111001000000110011101100101011101000010000001101100011000010110100101100100
 
sbi
@AlfPSteinbach There's an error in the third line.
(I know that wrapping depends on your browser window's width. I didn't think this would spoil the joke, though.)
 
11:25 AM
ah, the joys of reinstalling Windows
 
12:21 PM
whoo, 2000!
 
@Tom Congraz :)
 
;p
@Johannes: How is it difficult to address eq-?
 
12:47 PM
@sbi how so?
@JohannesSchaublitb tags answer "this question is about ___", and 'fast' and 'slow' are synonymous there
of course, it also shows why 'homework' and 'exercise' make bad tags
 
5
Q: Is there an established pointer value for a released pointee?

FredOverflowSome programmers like to set a pointer variable to null after releasing the pointee: delete ptr; ptr = 0; If someone tries to release the pointee again, nothing will happen. In my opinion, this is wrong. Accessing a pointer after the pointee has been released is a bug, and bugs should jump in ...

Update. Opinions?
 
1:05 PM
@Fred: I disagree with the initial premise
I think fewer "null deletes" are bugs than you imagine (or you could instead be working with a codebase with much worse concerns)
consider a simple smarter pointer, struct A { T *p; A(T *p=0) : p (p) {} void reset(T *p=0) { delete this->p; this->p = p; } ~A() { delete p; } };
both of those deletes may be against null pointers; neither one is an error or a bug
have you found any bugs by adding these additional checks which you would not have otherwise?
 
@FredNurk my opinion is that you can neither say the one nor the other way. i feel it depends on use case
but I see more cases where delete-null is fine than where it isn't, personally
Looks like an application of the "null object" pattern in disguise
 
it's not "null object"
 
I can edit too :)
 
1:16 PM
what are you referring to with "say the one nor the other way"?
 
delete ptr; is the interface method
and the null implementation the null pointer implements is "do nothing"
@FredNurk the one being "delete null" and the other being "we should consider it an error"
 
huh? I can't fit that into the original
 
@FredNurk sorry you lost me
 
what does "my opinion is that you can neither say the one nor the other way." mean? (trying to clarify where I'm confused)
I can't make sense of "neither say delete null nor we should consider it an error"
 
You can design your program to never call deallocate(null pointer) and you can design your program so it has cases where it's not a bad idea(like youshow with a smart pointer).
when implementing the deletion of a graph that may contain cycles, you may well want to diagnose deletion of an already deleted pointer, to detect when you run into a cycle
 
1:28 PM
@JohannesSchaublitb don't see your opinion there, just seems to be stating fact (so I'm still confused what you meant above); however, you present it as a dichotomy that excludes delete null as an error...
@JohannesSchaublitb I can't ever see detecting a cycle upon destruction there: either you'd do it earlier, while you can actually use the information, or you would no longer care
 
sbi
@FredNurk Pointers and iterators can be const themselves and so can the objects they refer to. IME both is quite commonly needed. How do you propose to server either purpose with such a function for an iterator?
 
@sbi: currently, the const keyword isn't applied to iterator in any way to get the const_iterator type, therefore, my syntax idea would also not use the const keyword to get const_iterators from iterators
int const* would be ptr(const(int)), int *const would be const(ptr(int))
 
you can already do so with macros
although it will break code :(
 
you cannot do it with macros; ptr(int) a, b;
I really dislike the 'ptr' name, but const, ref, (and even volatile) have obvious names
 
yes you can do that with macros
 
1:45 PM
you could do with decltype
 
2:06 PM
@FredOverflow ok, i added answer to the "null pointer after delete?" question. yes i know that's really a premise of the actual question, but it's what I think should have been asked. abstract: it's not a good idea.
 
sbi
I really don't get why @Tomalak and @DavidRodríguez are so defensive here.
 
@sbi: Not defensive. Attempting to understand why you said that my answer is "almost certainly wrong", with absolutely no rationale whatsoever.
(Especially when it's not.)
But let's keep it on the thread.
 
sbi
@TomalakGeretkal As I already wrote: I was about to post an answer. Only @Konrad was faster than I was.
@TomalakGeretkal (I lured you here for a reason. Comment discussions can be tiring.)
 
@sbi Whether they tire you or not, it is correct to keep them in the place where the person actually asking the question can learn from them.
 
sbi
2:44 PM
@Tomalak: "I hereby remove myself from any future conversation with you." Oh boy. Don't you think you got a bit carried away with that? How do you propose to do that? I'm here for 1.5 years and I don't plan to go away anytime soon. I'm active in the C++ tag and I'm very active in this one C++ chat room. It seems we live in reasonably well overlapping timezones. We will cross ways almost on a daily base.
FTR, I was carefully trying not to attack you. All I said was that I found that comment exchange tiring. (And I don't see at all what the OP could have learned from all that bickering about phrases.) I have no idea what I did to step on your toe, but I apologize for doing so unknowingly.
And now please, let's get back to a more civil level.
 
0
Q: reinterpret_cast

SWEngineerIn the C++ Without Fear: A Beginner's Guide That Makes You Feel Smart book, and in chapter (8), it mentions the following about reinterpret_cast ....converts from one pointer type (int) to another (char*). Because the cast changes the way the data pointed to is interpreted, it is called reinterp...

This guy's posted a few questions this morning relating to this book. Anyone here read it?
(It doesn't seem to be particularly good..)
 
sbi
@Tomalak: I've added a comment to the question. That book is not on the definitive list question and I have never heard about it. That doesn't prove anything, but it's a bad sign.
 
3:00 PM
@sbi What comment, what book? Help us blind dogs, please.
 
sigh
If you want to know, unignore the people talking about it.
Silly man.
 
sbi
@AlfPSteinbach Tomalak's message links to the question.
 
@Alf i put some rather long comments on your answer
 
@JohannesSchaublitb Yes, I see. Most of those comments are wrong. Sorry. May be because you're outside the formal, reasoning about the practical.
@JohannesSchaublitb In particular, standard guarantees null-effect of deleting nullpointer. So it's wrong to say that that's wrong.
 
lol
this is the same as when you are in an X86 course, and the teacher says "In ASM, pointers are just numeric entities" and then you say "No, in section <insert some c++ spec ref> it says pointers are not numbers".
here we are not in a c++ standard spec domain
it doesn't matter at all what the c++ spec says on this matter
 
sbi
3:09 PM
@JohannesSchaublitb But are they numbe? (SCNR)
@AlfPSteinbach I think most of the discussions about the answers on Fred's question arise because people do not distinguish between "it's formally Ok to invoke operator delete on a null pointer" vs. "it's wrong to double-delete" vs. "it's questionable to mask double-deletion by setting the pointer to NULL instead of fixing the actual problem". Mhmm. Thinking about my answer I might be guilty of that, too...
 
@sbi Yeah, but context should make it clear what's meant. I don't generally qualify my statements more than necessary for the up-and-up reader. Even the Holy Standard makes such assumption, e.g. talking about "the class pointed to by the expression". Some people may think that's error in standard. But generally they're not helped by the standard anyway, so no point in catering to them.
@JohannesSchaublitb Of course it matters what the standard says about deleting nullpointers. The standard's guarantee of no effect is a main reason why it's not in general a good idea to null pointers after delete. I mentioned one exception (pointer in standard container), and there are others (like, nulling of smart-pointer), but in general.
 
3:30 PM
@AlfPSteinbach lol maybe you need to change your pointer tutorial book too, if this contains such logic errors
 
@JohannesSchaublitb No logic error, but I didn't discuss that. It's just that C++ implementation is much much better at catching double delete than a checking convention can ever be. and one particularly important aspect is that the unreliable code that might do a double delete, can not be relied on to use convention, or use it correctly.
@JohannesSchaublitb I think you'll agree with this after some reflection. :-) (say, a week's time, it does take time (in my experience))
 
@Alf sure it can. if the only place you do delete x is immediately before the null-check, and you assign to null immediately after the deletion, your code will definitely detect the null pointer deletion
 
@JohannesSchaublitb That reliable code is where the checking gains nothing. ;-)
 
the checking is for unreliable code
unreliable code doesn't mean that the code can't detect logical errors of itself
if it meant that, using "assert" would be of no use. ditch <cassert> altogether
 
@JohannesSchaublitb it means that it cannot be relied on to implement the checking as necessary. wheras a good implementation can be relied on to do so, if you let it. and to let it do so, you have to not null the pointer (in general).
 
3:38 PM
it can't. it probably places a new object at the same location. and then it won't detect the double deletion.
 
@JohannesSchaublitb let's say it does. that new object gets deleted. it most likely causes an error pretty straightaway.
 
the runtime library of the implementation is just as well a part of the illogical program as the code that does the manual null check. there is no superiority over the main code itself.
 
@JohannesSchaublitb there is, namely centralization. all delete attempts end up in the same place. where the implementation can check.
 
just use mydelete(x); instead of if(!x) { ... } else delete x; and you have centralization aswell.
 
replacing one checking convention with another similar checking convention seems to gain nothing, so i'm not sure i understand what you mean here
anyway, raw new and delete should not be very frequent in ordinary code.
 
sbi
3:53 PM
0
Q: Can we have a reply-to-this-comment arrow to click on, please?

sbiIn the chat, I became quite fond of the littte arrow to the right of every chat message to reply to that message: It automatically adds the name of the person I want to reply to, which saves me the hassle of manually copying it (or face the danger of misspelling someone's name). Can we have th...

 
4:12 PM
What did I do?! One minute my code was working, next minute, it fails every single time. Damn, I hate these problems.
(I notice that I use this chat almost exclusively to vent. Please ignore me.)
 
if one ignores you, then that communicates continued attention to your request, doesn't it? difficult, this
 
ah here we have the reason @Prasoon was in the box: "@Prasoon @chrisaycock Bill the Lizard dinged him for sockpuppetry (annotated for 5 socks with a total of 1350 votes) and spent five days in the penalty box"
 
@Alf Didn’t even notice the self-reference but I love it. “Ignore this command.” just … wow. :-)
 
what does "annotated for 5 socks with a total of 1350 votes" mean?
bah playing with socks is no good. stinky xD
 
4:29 PM
mm
feels good to be a power user these days
 
hey is it good practice to follow people back if they follow you?
i mean is it considered mean to not to on twitter?
 
not as far as I know
 
@JohannesSchaublitb According to Prasoon those were his fellow students that he shares a flat (and IP address) with. I tend to believe that, both because I trust him not to do something like that, and because a few votes wouldn't matter to him.
2
 
@Alf i'm also not convinced about that he would do that.
@Alf apparently he deleted his mod nomination though. i think that's sad
 
wow
I've seen the first ever accidental use of SFINAE
 
4:38 PM
@DeadMG that's not SFINAE. StringType2 is just not deduced at all
 
no wait
I just noticed that they weren't overloads
 
@DeadMG I commented.
Johannes, would be nice if you could answer that question, because I've forgotten the explanation you gave (I remember just the effect, not the why)... ;-)
 
@Alf I didn'T really know either
I just mused that it might be because of complications of when the default argument contains the parameter type itself
like in T = T();
but I don't think that's a real problem. it could just say that this is a non-deduced context
@AlfPSteinbach today i found a closed issue report though, requesting this to work: open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#947
"These capabilities are part of the Boost parameter library". I've no idea, never used that lib. but it would be interesting to know to what extent that lib makes it work
of course, saying g(x) is explicitly forbidden by the current spec. even void f(int n, int m = sizeof n); is forbidden, i.e also if the expression is not evaluated.
 
5:38 PM
hey Konrad
innovation :P
0
A: Returning a template of templates

DeadMGSince you're in C++0x land (I noted your lambda), you can use a trick known as auto_cast, which we will rewrite a little bit to make it easier. template<typename container> struct auto_cast_container { container c; template<typename out_type> operator out_type() { ret...

I think my answer is the winrar here
 
@DeadMG See my comment. But the approach is correct.
 
ah yes
you are correct
I have edited my answer to fix the logic but I won't be implementing optimizations
 
Looks better :)
why did you change the decltype(op(typename Container::value_type())) to decltype(op(*c.begin())) though? I think that the first is fundamentally more readable
 
5:56 PM
the value type is an rvalue of value_type
but *c.begin doesn't return an rvalue, it returns an lvalue and a reference
if unary-op is not a lambda but more complex, then it might fail on the difference
for example, if it took an lvalue reference
when using decltype, you should always deduce the type exactly as you are going to call it, else you are begging for subtle type mismatch errors
 
And I need to remember the name “auto-cast pattern”. I know the pattern, and I know the auto_cast “operator” but I never before put them logically together :)
 
indeed
I've seen auto_cast before, but I just came up with making it into a pattern that works for containers too
 
@DeadMG Ah, I see. I’ve still got a lot to learn about C++0x. Pity I can’t just start using it. The library I’m currently working on could benefit very much from it
 
the thing is that in C++03, const reference is just how it's done every time
but C++0x introduces a lot more thought about what you take or don't take as an argument
so it's easy to write code that might fail with the new rvalue references
 
Weird, I could have sworn that I had commented on the original auto_cast question but looking now, there is no comment by me
 
6:00 PM
I've certainly read it
don't recall it in great detail though
except the guy couldn't make it work? or something like that
 
ah, I posted the comment on his blog
… which seems to be defunct
Eh, funny. Yours is the accepted answer on that question
4
Q: C++0x rvalue reference template argument deduction

dvideGiven GMan's deliciously evil auto_cast utility function concocted here, I've been trying to figure out why it doesn't compile for me when I'm trying to auto_cast from an rvalue (on MSVC 10.0). Here's the code that I'm using: template <typename T> class auto_cast_wrapper : boost::noncopya...

 
that code is wrong, though
should not be a reference, it should be a value
not that I was experienced enough to spot that
 
well
 
is ACCU a good thing?
 
6:03 PM
the reference should still be valid, on second thoughts
what is ACCU?
 
association of c and c++ users
 
no
C and C++ are so different, I don't think it's worth lumping them in together
unless you're referring to a specific group rather than just an idea
 
To this day, I have never written a C program
(except perhaps a “hello world” program, I can’t remember)
 
me neither
although that's not to say that I haven't written plenty of extremely poor programs that may as well have been written in C
 
@DeadMG why is it different if the group already exist?
i'm referring to the accu.org
o_O
 
6:14 PM
oh
becaus I have no experience with them and have no basis upon which to answer the question?
 
6:33 PM
@KonradRudolph Maybe you could request a "C++ angry dome" venting chatroom? :)
 
makes a test
nice!
 
/me also makes a test
 
teh script works
 
6:35 PM
@DeadMG Wait, isn't C++ just C with classes patched on? ;-)
 
what is the default setting for Character Set property in VS2008 project settings?
 
6:54 PM
aah, finally. Solved. #angrydome
 
sly
I got a simple GCC question, preprocessor more like. Anyone?
g++ -E gives lines of the sort
# 148 "/usr/include/locale.h" 3 4
what are those numbers exactly?
 
7:42 PM
What is the difference b/w "foo obj = foo();" and "foo obj(foo());". In first case, I understand that we are creating a temporary and copy constructing it. What is the second case ? Call to the constructor in the second case is taking place only when I give " foo obj( foo::foo() ) ;"
Why is that
I have given copy constructor too in class foo
 
@Mahesh foo obj(foo()); is a function declaration.
It declares a function named obj that returns a foo. Its parameter is a pointer to a function taking nothing and returning a foo.
 
7:57 PM
got you
getting very much confused
 
This syntax problem is also know as "the most vexing parse".
 
But when I do it on primitive types, it is working
 
By the way, there is no copy construction involved in foo obj = foo(); because both sides of the = are of the same type.
 
like int i(5);
 
That's different. The int equivalent would be int i(int()); which is also a function declaration.
You probably just want foo obj; without any parenthesis. This will call the default constructor.
 
8:00 PM
foo obj = foo(); No copy construction ? When does copy construction actually takes place ?
foo obj1( obj2 ) ;
in this case right
 
@Mahesh When the thing on the right is a different type than foo.
Oh, in both cases there is copy construction, but I was pointing out that it was not from a temporary.
6
Q: initialization: parenthesis vs. equals sign

FredOverflow Possible Duplicate: Is there a difference in C++ between copy initialization and assignment initialization? What's the difference between T a(b); and T a = b; and T a = T(b); ?

@Mahesh: maybe this will clear things up.
 
@FredOverflow: Exactly what I was looking for. Thanks.
 
@Mahesh: Alf's comment on his own post is important.
 
8:15 PM
@FredOverflow: I understand that explicit should be used when we don't want to use single argument constructor for implicit conversions. Why Alf's comment saying that constructor in this case should not be explicit.
We aren't making any sort of conversions here. Both lvalue and rvalue is of same type right ?
 
His comment about explicit only applies for conversions.
 
k ...
 
@Mahesh Beware, the terms lvalue and rvalue don't mean what you seem to think :)
61
Q: What are rvalues, lvalues, xvalues, glvalues, and prvalues?

James McNellisIn C++03, an expression is either an rvalue or an lvalue. In C++0x, an expression can be an: rvalue lvalue xvalue glvalue prvalue Two categories have become five categories. What are these new categories of expressions? How do these new categories relate to the existing rvalue and lva...

In C++, "lvalue" and "rvalue" have very little to do with "left" and "right".
 
lvalue means = the value that persists even after the statement;
 
For example, the assignment std::string("hello") = "world" is perfectly valid and has an rvalue on the left side.
 
8:19 PM
rvalue = the value that may/maynot persist after the statement
this is how I understood. Is it wrong
int i=5; // i persist after this statement; so it is lvalue
5 doesn't persist.. so it is rvalue
 
lvalue/rvalue is a distinction of expressions, not of objects (or values). It is a pure compile-time concept. At runtime, there is no such thing as an lvalue or an rvalue.
 
int i=j; // in this case both i, j persist after the statement; so all lvalues can be rvalues but not the otherwise
k
 
Let me find a good link for reading...
 
aib
Hi, I'm looking for a name for a function that converts object members to their identifiers as a part of a lazy loading pattern prior to caching/serialization. Any ideas?
 
The discussion on rvalue references is outdated, but the explanation of lvalues and rvalues is excellent.
Oh wait, "Rvalues are temporaries that evaporate at the end of the full-expression" is also wrong :(
 
8:26 PM
why is that - int i=5 ; doesn't it mean that rvalue (5) is evaporating at the end of full-expression
Probably in this case it might be wrong
char* ptr = "some";
here the string literal "some" can't evaporate at the end of full-expression
 
@Mahesh "Rvalues are temporaries..." must be wrong by definition, because an rvalue is a kind of expression, but a temporary is a kind of object.
 
@Mahesh string literals gets placed in a portion of memory where they're statically allocated
 
When we say---- static int i=5; the memory for i get allocated and initialized at compile itself. Right?
 
@Mahesh it's allocated and initialized at runtime, but before main is called
 
When ever, we use the term static , we relate it to compile time. Why is that then? When everything is happening at runtime
 
8:33 PM
I'm quite new to SO chats... Is it possible to use them via pidgin?
 
@Mahesh String literals are lvalues.
@Mahesh I'm pretty sure static variables of primitive type are "statically" initialized, yes.
 
@Mahesh static is a keyword that has the effects to statically (ie: for the whole program execution) allocate a variable. But if you talk of statically analyzing code (which is what a compiler do) that means the compiler analyzes code at compile-time, before running it
 
Unless they are huge arrays initialized with 0, then the compiler usually creates code for the initialization so the .exe doesn't grow ridiculously large.
Mahesh: Here is a very simple test to see if an expression is an lvalue or an rvalue. If the expression &(valid_expression) compiles, valid_expression is an lvalue. If it does not, it is an rvalue. (That is because the language requires an lvalue as the operand of the & operator.)
 
Excellent :)
To the point
 
...it does not really tell us anything about the meaning of lvalues and rvalues, though :)
 
8:39 PM
I will read the blog link you have given and relate it with your previous statement
 
Sadly, every text I know sooner or later confuses expressions with objects. (Even the current standard draft!)
There is a great video about rvalue references:
But again, the distinction between expressions and objects is not always clear in that video.
 
"I'm pretty sure static variables of primitive type are "statically" initialized, yes." statically = compile - time/ run-time. Sorry, if I am troubling you with my repeated questions ;)
 
If you peek into the .exe file, you will probably see the 5 laid out somewhere in the data segment, and there will be no code that "puts it there" at runtime. That's what I mean by "statically" initialized.
But of course, the loader has to transfer the .exe from disk into memory, and you could argue that this happens at "runtime".
But I wouldn't say that. The whole point of C++0x's constexpr facility is to move initialization of static class objects from runtime to compile-time.
 
@JohannesSchaublitb That's what it used to stand for but it deliberately is just ACCU, now. It doesn't stand for anything, just a historical anomaly.
 
@CharlesBailey Just like lvalues and rvalues :)
 
8:48 PM
@CharlesBailey ohh
@CharlesBailey so now it's just C++ and D people?
is ACCU only for US guys?
ah I think I confuse it with NWCPP
 
@JohannesSchaublitb US as in we? Or as in UK's special friend?
2
@JohannesSchaublitb Language agnostic (to a reasonable degree).
 
@FredOverflow : Thanks for the info
 
US as in UK's special friend
ohh i see
 
@CharlesBailey we as in us or as in the band? :)
WE is a Norwegian rock band from Oslo founded in 1992. Band members Current members *Thomas Felberg, vocals *Andreas Dons Kirkvaag, guitar *Kristian Dons Kirkvaag, drums *Geir Anders Jensen, bass (1993) *Jan Tariq Rui Rahman, keyboards (2003) Former members *Paal V. Bakke, bass Discography Albums * In A Field Of Moose (Nun Music, 1994) * Violently Coloured Sneakers (Voices of Wonder, 1996) * Wooferwheels (Voices of Wonder, 1997) * Livin’ The Lore (Voices of Wonder, 1999) * Dinosauric Futurobic (Black Balloon, 2002) * Lightyears Ahead (Black Balloon, 2003) * Smugglers (Nun Music, ...
@Johannes: C does not have rvalues anymore, right?
 
@JohannesSchaublitb It's UK based although there is a US "chapter".
 
8:52 PM
i shy'ed away from joining ACCU because my english wasn't really good some years ago
but now I think I can cope
 
@JohannesSchaublitb I learned English by watching the Simpsons mainly :)
 
@FredOverflow it never really had rvalues, I think
 
@JohannesSchaublitb If you can make it to the conference I'll buy you a beer.
 
rvalues in C are just called "values"
@CharlesBailey ahaha
 
@JohannesSchaublitb So C has expressions that are called "values"? :)
 
8:54 PM
@FredOverflow C has expressions that are lvalues and expression that aren't.
 
@Fred in C, the spec says What is sometimes called "rvalue" is in this International Standard described as the "value of an expression"
(in a footnote)
C has three types of expressions: Lvalues, function designators and then all remaining ones
 
But an rvalue is an expression, not the value of an expression...? That adds even more to the confusion :)
 
yeah I think they have a sloppy footnote there
i think they want to say "expression yielding a value"
but then they don't define "rvalue" in their spec. they just say that others use the term rvalue in a sloppy way xD
 
00:00 - 21:0021:00 - 00:00

« first day (96 days earlier)      last day (4854 days later) »