« first day (213 days earlier)      last day (4721 days later) » 

4:13 AM
0
A: Converting a member function to a static function in C++

Fred NurkIf your compiler supports 0x lambdas, you can use a closure: int main() { MemoryTester tester; // If no need for dynamic allocation, don't use it. setAllocateFunction([&tester](uint8_t size) { return tester.malloc(size); }); setFreeFunction([&tester](void *p) { tester.free(p); })...

@DavidRodríguezdribeas I like the 0x lambda option :D
 
 
2 hours later…
5:58 AM
@DavidRodríguezdribeas My only complaint with the singleton is that the lazy instantiation leads to less well-defined lifetime of the instance, possibly causing crashes during shutdown if interdependencies exist between singletons.
@DavidRodríguezdribeas otherwise I don't see the big issue.
 
6:23 AM
@DavidRodríguezdribeas in terms of testing, a global is far superior to a singleton. A global doesn't prevent you from creating short-lived per-test instances.
On top of that, of course, a singleton just adds unnecessary complexity, which is always a bad thing
 
morning all
 
hi
 
what does this morning bring?
 
rain :(
 
6:29 AM
well, and nothing is working at work
and I slept on a couch
 
@jalf oh that sucks
 
6:50 AM
Sleep? What is sleep. I only know trees in Java.
 
7:06 AM
What have trees in Java got to do with sleep?
 
They feed on it.
 
morning
 
ARGGGGH When will someone upvote this answer? It's very correct and good and useful and all that. And I want a Populist badge ;)
 
7:12 AM
@MartinhoFernandes :)
 
@CatPlusPlus sleep is what cats do most
 
No. Not mine. I want people to upvote the other answer!
That's what's driving me crazy.
 
sbi
@MartinhoFernandes Wow, I didn't know you could strike text here.
@MartinhoFernandes That link doesn't point to your answer, but someone else's. Is that one of your sockpuppets?
 
@MartinhoFernandes the accepted answer?
 
7:15 AM
No, I don't have sockpuppets. If I had, I'd be upvoting the accepted answer. It needs to be at 11, and mine at at least double (which I always thought would be the hard part).
 
seriously?!
 
@Nils an online running linux distrib
nice!!!
 
gcc command not found :(
 
@Nils so we can't compile hello.c
 
Wondering how this works? What about the filesystem?!
 
7:17 AM
damn :(
@Nils the server on which it is running?
 
@TonyTheTiger How stupid.
Woohooo! Compiled it.
 
@MartinhoFernandes how'd you do that?
 
nah @TonyTheTiger as far as I understood it's supposed to run directly in the browser using an x86 CPU emulator written in js
 
:P
It has tcc installed.
Whatever that is.
 
~ # df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 2.0M 1.4M 441.0K 77% /
tmpfs 14.9M 0 14.9M 0% /tmp
 
7:19 AM
@Nils oh wow
 
cool
 
but networking doesn't work
heh it even has awk
 
vi & emacs as well. Nifty.
 
7:25 AM
so I need to get some work done :)
 
@TonyTheTiger Bah, I find that a waste of processor time. It's a fight you can't win. There are pots of gold at the end of pi, but you cannot reach it.
 
@MartinhoFernandes I know, but I guess these guys have nothing better to do
 
7:50 AM
@MartinhoFernandes Obviously. Same author. Which is also the author of qemu.
Someone impressive...
@TonyTheTiger and he was the previous record holder of the number of digits of pi...
 
Afaik, they mainly do this as a big correctness test. If two separate systems end up with the same 5 trillion digits, they probably behave identically with respect to rounding errors and such ;)
 
@jalf interesting way of looking at it
the hardware they used was rather impressive :)
 
is just what I read somewhere
it makes more sense than claiming that those 5 trillion digits are actually useful ;)
 
@jalf perhaps they are for some obscure maths :P lol
 
8:11 AM
the article I read claimed that with far less than 5 trillion, you could already calculate the circumference of the solar system to within a proton's width, so I kinda doubt it :)
 
@jalf oh wow :)
 
8:35 AM
@jalf I believe I read the same article
 
And in math you can always just go with the exact quantity: π.
Damn, pi look weird on this font.
It's practical applications that need its digits.
 
pi looks weird on a plate too; makes me hungry
 
@FredNurk lol
0
Q: Recomendations to not compare const double and double in C++?

NarekIs it right that it is not recommended to compare double and const double in C++ (because I guess it is compiler dependent)? To be more precise it is not OK to compare a double which is hard coded and a double which should be computed, as the last number of the resultant of the calculation can v...

what is this guy on about?
 
@TonyTheTiger he means "literal" by "const"
 
@FredNurk and then what? I don't see what the problem is?
 
8:43 AM
double d = compute_one_half(); assert(d == 0.5); // might fail
because, for an inaccurate example, your d might be 0.499999999
 
@FredNurk so it's this whole accuracy problem
 
appears to be, yes
you can tell he means "literal" instead of "const" because of how he used "hard coded", and literals are often called "constants" (but not "consts")
 
Bah, someone just give the guy a link to "everything you should know about fp arithmetic" or whatever that is.
 
as to the rest... I've got better questions to answer :)
@MartinhoFernandes: if it's in the c++ tag wiki and I think it should be fairly obvious it applies, I generally won't link to it
 
@MartinhoFernandes that's a a hard one
 
8:47 AM
@TonyTheTiger I don't understand what you mean.
 
?!
 
@MartinhoFernandes it's a hard text to read and understand, the one about floating point arithmetic
 
I don't think you should be able to rewrite the paper by heart, but you should gain some understanding from it, even if it's just "FP arithmetic is too complicated for me".
 
@MartinhoFernandes run away, all ye subgeniuses, from the horror that is floating point
@TonyTheTiger, @MartinhoFernandes: it's a dupe anyway
 
sbi
9:03 AM
Ha! A Singleton question to jump on: stackoverflow.com/q/6028472/140719
 
@sbi: I love the title on that article you linked to.
 
@sbi arrrrghhhhh singletons = pain!!!
 
I never understood why everyone loved a pattern that is complicated to implement (given the number of questions about how to do it "right", I'll have to assume so), and all that to solve the problem of... Wait, what problem?
What problem did the GoF claim it solved?
 
Because it's a PATTERN
duh
 
@jalf didn't know you wrote so extensively about singletons
 
9:08 AM
Everyone loves patterns
@TonyTheTiger the blog post?
 
@jalf that's what I'm referring to
 
I did that after I'd ranted about them a few dozen times on SO, to try to formulate a single answer I could refer people to
@MartinhoFernandes I think the "problem" was "you have an object that needs to be globally accessible, and which you only have one of", so I kind of suspect they worked backwards from "we have a singleton, what problem can we come up with to justify it"
 
9:33 AM
Say you wanted to write a program to solve a sudoku puzzle and you also wanted the computer to just guess the number, instead of actually calculate it, how could you implement a guess?
 
Guess what number?
 
@TonyTheTiger knuth's dancing links
 
@MartinhoFernandes yea guess the number
 
In computer science, Dancing Links, also known as DLX, is the technique suggested by Donald Knuth to efficiently implement his Algorithm X. Algorithm X is a recursive, nondeterministic, depth-first, backtracking algorithm that finds all solutions to the exact cover problem. Some of the better-known exact cover problems include tiling, the N queens problem, and Sudoku. The name Dancing Links comes from the way the algorithm works, as iterations of the algorithm cause the links to "dance" with partner links so as to resemble an "exquisitely choreographed dance." Knuth credits Hiroshi Hitotsu...
@TonyTheTiger: dlx guesses through algorithmicly-optimized brute force
 
@FredNurk hmmm
 
9:50 AM
@TonyTheTiger What do you mean with "solve it and just guess"?
 
hai
 
@MartinhoFernandes guess the solution, not calculate and work out the exact solution, but make an educated guess, I guess (no pun intended)
hai @DeadMG
 
took my breath test today
they gave me a pill of urea, it tastes like vomit
very directly
 
and when you getting the result?
 
two weeks
 
9:55 AM
oh ok
 
@TonyTheTiger If you don't want something very sophisticated you can just grab what I call the "candidate set" (the set of numbers that you can place there that won't immediately invalidate the board) and pick one randomly.
 
@MartinhoFernandes hmmm that's kinda what I was thinking
 
If you want something more sophisticated, you can just run the solver algorithm for a while (either in time or steps) to further reduce that candidate set.
 
@MartinhoFernandes each step of DLX will select a square that only has one possible value (len(candidate_set) == 1), if one exists
@TonyTheTiger: seriously, check out DLX, it's worth knowing even if you don't use it for sudoku
 
sbi
10:14 AM
@jalf How about proposing a new reason for closing questions: "Uses Singletons"? Seems fair to me. :)
3
 
@sbi that close reason would be a singleton! we already have "duplicate" :)
this looks to be the one to close with: stackoverflow.com/questions/137975/…
 
10:30 AM
"The Chef does everything but cook- that's what wives are for!"
 
@sbi that's a good article, I've read it :)
 
10:50 AM
> When discussing which patterns to drop, we found that we still love them all. (Not really—I'm in favor of dropping Singleton. Its use is almost always a design smell.) -- Erich Gamma
You should've thought that before you poisoned the minds of the teeming millions!
 
11:02 AM
> Of course I loved all of Design Patterns, except for pages 243 to 256, (...). I could tear those pages out of every single copy of Design Patterns at Amazon, and almost nobody would notice. That's because it's the most important one, so of course nobody gets it. I sure didn't!
I don't have a copy of GoF. Can someone tell me what pattern is on those pages?
 
@MartinhoFernandes I suspect that the minds that were so easily poisoned were probably doomed anyway
 
@jalf heheh
 
if you adopt a downright stupid piece of copy-paste code just because someone who wrote a book 15 years ago told you to, then you're screwed regardless of what that book told you to do
You know what always pains me? Wishy-washy "yes but anything can be misused, don't consider the tool bad because you don't know how/when to use it" comments
YES, SINGLETONS ARE BAD. YES, GOTO IS BAD! Deal with it!
4
/me grumbles
I mainly hate those comments because I remember I amde one or two of them myself once
So I feel I can chalk it down to ignorance and lack of experience with good conscience
but just because you don't have the knowledge needed to face realities, there's no need to try to drag others down with you!
</rant>
 
> Speaking of memory leaks, what if your Singleton has a handle to some limited resource, like a database or file handle? I guess you get to keep that sucker open until your program ends. Thank God C++ programs never last longer than about 10 minutes before crashing, usually from running out of resources, or from trying to access a Singleton that someone freed.
Why would anyone even think of freeing a singleton? Is there no end to this madness?
 
at least Singletons give us something to rant about :)
 
11:17 AM
Speaking of which, is there absolutely any other situation where the double-checked locking idiom rears its ugly head besides singletons?
 
@jalf The problem is that far too often one criticizes the singleton pattern but doen't present the alternatives. (Yes, I'm also a culprit for that).
 
@TonyTheTiger a good ranter can always find something to rant about
 
@TonyTheTiger I don't need that.
 
@jalf True
 
Xeo
@jalf Though, in contrast to Singletons, goto has its uses.
 
11:20 AM
@AProgrammer you don't need singletons, or you don't need to rant?
 
I don't need singletons to rant when I feel like ranting.
 
@AProgrammer I see
lol
 
cpx
why singletons are bad? or are they just bad? lol
 
157
Q: What is so bad about Singletons?

Ewan MakepeaceThe Singleton pattern is a fully paid up member of the GoF Patterns Book but lately seems rather orphaned by the developer world. I still use quite a lot of singletons, especially for Factory classes, and while you have to be a bit careful about multithreading issues (like any class actually) fai...

 
cpx
thx, I was looking for the legendary question.
 
11:31 AM
@Xeo but they're still bad. I just don't see a direct relationship between "badness" and "usefulness". it is possible for something to be bad, and still have rare, but justifiable uses.
 
@AProgrammer BTW, does someone know a good discussion of the alternatives?
 
in any case, most of the examples people usually use to justify a goto tend to boil down to "I'd have to refactor more heavily to arrive at a clean solution"
rather than "a goto is genuinely the cleanest solution"
but yeah, I agree that gotos are in a different category from singletons
 
@AProgrammer good question... pass the object around?
 
Yeah, you basically just have two (both obvious) alternatives
make it a global, or pass it around to those that need it
 
@TonyTheTiger Now the dependencies are more explicit, but if you still make it a singleton, pain still ensues.
 
11:39 AM
@MartinhoFernandes point is not to make it a singleton
 
@MartinhoFernandes well, don't make it a singleton then
the alternative to "make it a singleton" is really just "don't make it a singleton. Just do nothing special"
 
do as you would normally do
 
@TonyTheTiger My point was that you can make still make it a singleton and pass it around..
 
@MartinhoFernandes true, but why would you?
 
11:42 AM
@MartinhoFernandes yeah, but you could also make every class have a name that is a randomly-generated string of 80 characters... but why would you? Just don't do it
 
@TonyTheTiger Because you love singletons and now you're passing it around, which makes singletons even cooler.
 
@MartinhoFernandes ugh :(
some things are just not done, singleton being one of them
 
I'm trying to say that "pass it around" is not a very good alternative, because some offenders may already be doing that.
 
@MartinhoFernandes perhaps there is no alternative, as the idea a singleton represents is just flawed
 
@jalf There is at least Parametrize From Above pattern, the Monostate one, tje "just make a global variable" one, the "make a procedural API which use private state one", ... all have advantages and inconvenients. I wanted a discussion which compared them with the singleton one.
 
11:44 AM
@MartinhoFernandes once again, the alternative is "just don't bother". if you're already passing it around, that just makes it easier for you to refactor the singleton away
@AProgrammer well, the way I look at it is, once you've found one alternative that, compared to a singleton, is better or equally good in every way, then the singleton can pretty much be eliminated from the discussion. Then it's no longer about "what is a good alternative to singletons", but rather "what is a good solution to this general problem"
 
sbi
@MartinhoFernandes Where are all those quotes from?
 
and we have such an alternative. "Make it a plain old global" solves some of the problems with singletons, and leaves others unchanged, so it's no worse. So substitute every singleton occurrence for a global, and we no longer need to find alternatives to singletons
now we just need to find the optimal solution to a design problem
 
cpx
@jalf I'll have it bookmarked for later read.
 
sbi
11:48 AM
@MartinhoFernandes Ah, that guy. I have read stuff by him before, but I can't remember that one.
> Here's what most people got out of Design Patterns: "blah blah blah blah SINGLETON blah blah blah blah".
Haha.
 
@jalf In my experience, there isn't an always better solution. I end up with one or the other depending on the situation at hand (which far too often include an aspect "we have this bunch of code we can't touch now")
 
sbi
> If they claim expertise at Design Patterns, and they can ONLY name the Singleton pattern, then they will ONLY work at some other company.
LOL!
 
@AProgrammer but we don't need an "always better" solution. We just need a "never worse, and better in at least one way" solution
once we have that, singletons are just not interesting any longer
 
@jalf How do you initialize your global variable (lazy initialization is the number 1 reason for using singleton)
 
If you don't know any better then to use a singleton, then you shouldn't be a programmer
 
11:52 AM
@AProgrammer If I have a class where initialization is fickle and must be done at the right time, in the right order, then I don't make it global. I make it local, so I have control. If I don't care exactly when it is initialized, I might make it a global (provided a number of other conditions are fulfilled as well, of course)
but if the lifetime of your globals is a key part of your application's control flow, then you're doing it wrong.
but of course, the straightforward answer would be "do it exactly the same way you would with a singleton... But make the constructor public, so I can also create other instances"
then you're left with a lazily instantiated global, and you'll just get an evil glare from me, instead of the kick in the groin that a singleton might earn you ;)
 
I just used a singleton to implement program licensing in a package I am writing cause I was too lazy to find the accepted solution....
 
sbi
@MartinhoFernandes That one doesn't seem to be in that article.
 
12:20 PM
hi @sbi
 
sbi
@DeadMG Hi.
 
had my breath test today
 
sbi
@DeadMG So I read. What does that mean? What's a breath test?
 
apparently, it's still two weeks before the results
it's a test for some specific infection
involving breathing into a tube
 
sbi
@DeadMG Ah. Ok. I didn't know you were expecting that.
 
12:27 PM
yes
I have been ordered a breath test, a blood count, a liver function test, and a urine test
still need to make an appt for the other three though, lots of work to do
 
sbi
@DeadMG Yeah, that can get nasty, making so many appointments. A time killer.
 
I only have to make one for the other three, I think
more important than making them is keeping them
have to travel a not inconsiderable distance to reach the hospital os
so
 
sbi
@DeadMG When one of my sons stopped increasing weight as a breast-fed baby, the doctor ordered half a dozen tests to be made. With appointments for all of them, and half of them being done, the very first test turned up a result. We were thinking that maybe we should have scheduled each one after the one before turned up no results, but then that was a sick baby, and you spare no expenses to get it healthy.
 
true
however, I am definitely not a baby :P
 
sbi
@DeadMG Yeah, I kinda suspected. :) Which is why I brought that consideration up.
 
12:32 PM
lol
the other tests only take a week to come back
whereas the first one is two weeks
 
so when you gonna go for the others?
 
probably going to make an appt on Thursday when most of my coursework is done
 
oh good :)
 
of course I could stop yapping and get on with it
:P
 
sbi
@DeadMG Where'd be the fun in that, though?
 
12:35 PM
yeah
exactly
 
heheh
 
man
my home machine is so slick and awesome compared to the machines at university
 
hmmm, my home machine is pretty slick to what I had at my last job
 
sbi
@TonyTheTiger Ouch.
BTW, have you already started at the new job, @Tony?
 
amagad, wtf
lost all my progress?!
 
12:38 PM
@sbi yes :)
@DeadMG how'd you manage that?
 
sbi
@TonyTheTiger Well??
 
no idea
 
@sbi what?
 
it's saved to the server, but now it's reverted to before I did three hours on it yesterday
 
sbi
@TonyTheTiger He dropped his progress bar. (That's were the progress is served.)
 
12:39 PM
@sbi lol
 
sbi
@TonyTheTiger How is it? (Did you really not know I would be going to ask that?)
@DeadMG What are you talking about? What progress? What server?
 
my coursework
we're developing a website on a server provided by the university
yesterday I went to the labs, did some work, saved the changes to the server
 
@sbi It's alright, quite different to the stuff I've been doing... still getting into the ruts of things.
 
now I've just come and copied my work off the server and it's reverted to before
 
@DeadMG that sucks :(
 
12:41 PM
you're telling me
 
sbi
@DeadMG But of course, that's no problem, since you have it in some VCS, right?
 
at least it needed a lot of changes anyway ;p
no, it's a university project, they don't provide source control, and even if I used my own, I'd have to teach all my colleagues to use it too
 
sbi
@DeadMG See, there is absolutely no, I repeat: NO excuse for not using VCS. Never. NEVER. And that applies to your case, too. (You could have used some VCS just for your stuff.)
7
 
I have a backup on my hard drive
but I just updated it with the copy from the server, which is always supposed to be the latest
 
@sbi I guess you feel pretty strongly about that
@DeadMG that assumption just failed you...
 
sbi
12:44 PM
@DeadMG Backups are not VCS. For starters, they don't have a browsable history.
 
Assumption is the mother of all fuck-ups
3
 
it's hard for it to be an assumption when I just made it the latest copy last night :(
 
sbi
@DeadMG See, there's another difference between a backup and a VCS.
@TonyTheTiger Learned my lessons years ago.
 
normally, I don't find it that big a deal, as most of my source code I feel needs significant refactoring anyway :P
 
@DeadMG I feel the same way about some of the stuff I've written :P
 
12:47 PM
oh yes
I learned recently that my UI layout idea is already an official data structure
it's called a kD tree and is an octree/quadtree variant
 
@DeadMG oh gosh, not the simplest either
 
sbi
@DeadMG Refactoring without VCS (and unit tests) is impossible to do properly.
 
honestly, given the project at hand, there's just not enough time
 
@DeadMG and there are already gui layouts using a kd-tree?
 
@sbi you probably have a very valid point
 
12:49 PM
no idea
 
sbi
@TonyTheTiger Never had any others. :)
 
I had the idea of a kD tree, thought it would make a good tool, and then learned of it's proper name
maybe there are already gui layouts using a kD tree
 
WebGL
 
Xeo
I constantly get upvotes on this one, but no answer T_T
8
Q: Type erasure techniques

XeoWith type erasure, I mean hiding some or all of the type information regarding a class, somewhat like Boost.Any. I want to get a hold of type erasure techniques, while also sharing those, which I know of. My hope is kinda to find some crazy technique that somebody thought of in his/her darkest ho...

 
@DeadMG is that like a 3D layout or something, have no idea how Kd tree GUI would look like?
 
sbi
12:51 PM
@Xeo It does have two answers. Can't you count that far? :)
 
@TonyTheTiger it's a data structure for spatial subdivision
 
the point of kD is that k is any dimensionality you need
 
sbi
It seems one of you guys here is Robert Pate in disguise.
New Blog Post: Recovering Singleton Addict. http://bit.ly/jkZ00Y #singleton #coding
That was re-tweeted by him.
 
@DeadMG What exactly do you want to achieve with the kd-tree laying out gui elements in 2d or 3d? and how exactly should they be arranged?
 
@Nils hmmm. that really tells me a lot on how you'd use it in GUI... any examples around?
 
12:54 PM
well, I feel that it would be easier to use it to relatively position elements relative to each other
 
@sbi not me
mabye @Xeo? lol
 
@DeadMG maybe haven't done any gui things lately..
 
@DeadMG I just use width and length or something
 
What about a Voronoi-diagrams? You initially create a Voronoi diagram with the elements centres as points.. the you could move it so that the cells get all about the same area..
however I don't think that's easy to do
 
pretty happy with the kD tree, I think
 
Xeo
12:59 PM
@sbi *No good answers
:P
 
ok
I officially hate ASP.NET
 
@DeadMG we know that
 
either abstract the stateless system of HTML/HTTP or fuckin' don't
 
lol
so elaborate on your hate?
 
I hate it because it's a mess
half of it is stateful like you would expect, the other half is stateless
 
1:01 PM
@DeadMG PHP for you then
have fun
 
so you have to continually mess around and serialize things manually and argh
 
:)
 
it's still better than PHP
 
ugh PHP :(
 
1:02 PM
it's supposedly not too bad if you ignore all the webforms crap, which is basically the stateful bits
 
people are starting to use google go for web
 
I've never really been able to put it to the test
 
@DeadMG I know, its annoying
 
yeah, but they're also the automatic bits
the bits that perform post back to the server for me, and etc
 
yeah, so don't use those :D
 
1:02 PM
@jalf sometimes you can't do without though
 
what else am I gonna do, write HTML myself?
I'd still have to manually serialize all the state I wanted to save into the Session or Viewstate or something
 
@DeadMG yep. Unless you can find a completely parallel, but stateless, implementation by some third party
looked at asp.net mvc? Might be less painful
 
no way I can switch this late in the project
 
@jalf I have looked into that, but it's patterns again
 
well, I'd really rather actually look into something that's stateful
if you give me a class, and I make a member variable, I expect it to hold it's state
 
1:05 PM
@DeadMG that's a bit more then you can ask for in ASP.NET
 
uuhhh u have to do web IN CLASS?
 
obviously
 
I hated that, it's retarded
 
yeah
 
@Nils don't a lot of people have to do that?
 
1:05 PM
the thing is, I'm pretty sure that my thing should be fine
 
including myself and listening to how great JavaEE is
 
but controls keep losing their states and stuff for no useful reason
ASP has an incredibly annoying habit of performing callbacks at seemingly random times
for example, I had to debug a page where it called the OnClick for the button when you loaded the page
whereas we quite clearly did not click the button
 
SO is written with MS Web stuff
 
and then wouldn't call it if you clicked the damn button
 
@DeadMG oh shit :(
that is retarded
 
1:08 PM
@TonyTheTiger but it's a far more reasonable pattern than certain others
dammit git
stop making my life so needlessly difficult
 
yeah
 
@jalf still struggling to get it all up and running?
 
@TonyTheTiger struggling to get it to handle our terrible code base
trying to use gitattributes filters to change the encoding of files during checkout/commit
 
ok
I think that reverting to the previous version was actually a big improvement
all the heisenbugs I introduced seem to have gone
although I lost all my complex database interaction logic
fuck
 
@jalf oh, I see
@DeadMG wouldn't wanna be in your position right now
 
1:21 PM
eh
I don't really think it'll take me that long to re-write
 
honestly, LINQ is the best thing ever
 
yes, gotta love LINQ :) :)
 
1:52 PM
1
A: Overloading on R-value references and code duplication

sellibitzeRecycling temporaries is an interesting idea and you're not the only one who wrote functions that return rvalue references for this reason. In an older C++0x draft operator+(string&&,string const&) did the same. But this got changed for good reasons. I see three issues with this kind ...

sellibitze was a lot more helpful than Howard Hinnant.
 
@MartinhoFernandes I think Howard's answer was more intended for FredNurk than for the question at hand
 
The moose (North America) or Eurasian elk (Europe) (Alces alces) is the largest extant species in the deer family. Moose are distinguished by the palmate antlers of the males; other members of the family have antlers with a dendritic ("twig-like") configuration. Moose typically inhabit boreal and mixed deciduous forests of the Northern Hemisphere in temperate to subarctic climates. Etymology and naming The animal bearing the scientific name Alces alces is known in Britain as the elk, and in North America as the moose. The British English word elk has cognates in other Indo-Europea...
 
@LucDanton I meant the answer and all his comments together.
 
2:25 PM
argh
I don't understand why I have to explain to fellow coders what seems to be obvious to me?!
 
hi all ..
 
0
Q: Why inner "template" class not allowed inside function ?

iammilindvoid fun () { template<typename T> struct InnerClass {}; } gives errors. error: expected primary-expression before ‘template’ error: expected ‘;’ before ‘template’ Just wanted to know, WHY ?

 
rlc
2:45 PM
@TonyTheTiger does C++0x still forbid it?
 

« first day (213 days earlier)      last day (4721 days later) »