« first day (220 days earlier)      last day (4720 days later) » 

Xeo
1:00 PM
@Nils I think that will still take a while
 
sbi
@Xeo *charge_acct = false;
 
*charge_account = false
 
@Xeo charge_acct = false; no deref
 
sbi
@ÓlafurWaage :P
 
1:00 PM
I was too slow
lol
 
no rep for you!
 
damn you, :)
 
Xeo
Seriously, the first time I looked over the code I totally didn't see it. :|
 
@xeo Then channel9 and the standard is probably all we have for now..
 
1
Q: What programming tests can clearly prove developer skill-sets?

Timothy KhouriSCENARIO: I'm building Dev++, which is designed to provide real testing for developers to prove their skill-set and for recruiters and employers to cut throw all of the "fake resume's" where a everyone seems to be a guru of every programming language and concept ever written. What programming t...

 
sbi
1:03 PM
@Nils You're not making sense. At the level you are, Alexandrescu is not what you need. You do need an introductory book. If you know that question, then make your pick. As to C++11: My bet would be on a 4th edition of TCPL, but I don't know whether Stroustrup has planned one. (You could always ask him in a mail, if you don't find anything, he's very responsive.)
 
so I need to write code now
 
If the warning level is low, then I sometimes forget to write the return statement (I just write result; instead of return result;). It has happened that I looked at the code for hours, not seeing the mistake...
 
@sbi Nah I'm not that dumb
 
@sbi Last email I wrote an email to Stroustroup, I never got a response
 
sbi
@Nils That has nothing to do with it. I see the questions you ask here, and I think you need a good, thorough, introductory book. (I have taught C++ for a decade.)
@TonyTheTiger I've written to him about half a dozen times in the last 15 years, and I always had a very prompt response.
 
1:06 PM
@sbi hmmmm
 
@TonyTheTiger Perhaps you can get the answer for whatever you asked via another channel (comp.lang.c++.moderated).
 
sbi
@Xeo The pointer rang alarm bells the moment I saw it. There's just two use cases I can think of for a non-const bool*: (1) The function wants to return the address of a bool that the caller should have access to. (2) The caller might want to get a boolean result from calling the function (in which case it passes the address of a bool) or not (it passes NULL). Both are extremely rare.
 
wikipedia broke
 
sbi
@TonyTheTiger Maybe you ended up in his spam filter. Someone I know (who owns a company) has a three-digit number of emails per day - plus thrice as many spam. He fights hard to answer as many mails as possible and never looks into his spam filter. I can imagine Stroustrup having even more mails per day.
@ÓlafurWaage A promise?
 
@sbi valid point
 
1:13 PM
@sbi nah, I just get an error message on wikipedia.
"Can't contact the database server"
 
sbi
@ÓlafurWaage Yep, times out for me.
 
@sbi Well I have to admit every time I write a templated class or method I have to reread/rethink the template mechanism carefully..
 
wikipedia works for me
 
Is the issue with template classes fixed in C++11 ? (separate .h and .cpp files not working)
 
@TonyTheTiger it does not work here
 
sbi
1:24 PM
@ÓlafurWaage That was already fixed in C++98 (export), but only very few compilers implemented it. Since it met so much resistance, export was deprecated for the next version of the standard.
 
@sbi I think it was removed outright
 
sbi
@jalf Or that. I really don't know. I'm very disappointed, though.
 
at EDG's insistence, iirc. They figured since they actually implemented it, they'd have to maintain it for years if it was merely deprecated, but if it got removed, they could just ditch it and move on with their lives ;)
it's my impression that there were a couple of problems with it though, which just didn't make it worthwhile to support'
but don't ask me what they were :)
with any luck, we'll get a proper module system in the next revision, which could hypothetically solve the problem
/me is such an optimist
 
go you!
 
1:29 PM
Dear All.
 
Dear Uri,
 
I am interested in purchasing c++ interview questions
 
purchasing?
 
you can find them for free too...
 
they should be structured
indeed
 
1:30 PM
google has answers :)
 
Yes
 
int* p = new int(4); <-- wat is dis?

That will be 4$ plx
 
although i am looking for quality questions
 
and willing to pay for them
Is anyone interested?
 
1:31 PM
How will you know if they are quality if you haven't seen them? And how will we know you're good to pay if we show you the questions?
 
Regarding the removal of `export: herbsutter.com/2010/03/13/…
> at this meeting EDG reported that they would prefer the feature to be removed rather than just deprecated, because a deprecated feature is still part of the standard and required for conformance. By removing it from C++0x, it removes the maintenance burden of being forced to support export indefinitely to maintain full standards conformance
oh check it out, the quote worked in my first attempt!
 
Xeo
@jalf uhm.. applause? :)
 
For a set of questions I will send a contract with all the details including payment and IP privileges
 
good grief, why?
 
1:33 PM
Or, you can get fees each time a question appear in an online test
 
if you need to buy your interview questions from a third party, it seems doubtful that you'll manage to hire qualified developers anyway
 
Tony nice link. Make him donate to a charity or something.
 
for skills assessment purposes
 
@sbi Thanks. I keep forgetting unnamed namespaces are possible and work in a useful way.
 
@UriLukach no need for that, there's plenty of good interview questions out there
 
1:34 PM
not at all, there are moderators who will review these questions
 
C++0x, feels like I'm born again.
 
sbi
Herb Sutter long ago published an article arguing that `export` failed to provide any of the advantages it had promised. However, that's very old and it was wrong. I have seen both Daveed Vandervorde and either Pete Becker or PJP (which used it in Dinkumware's std lib implementation) report that it did deliver at least on one important promise: If you change a minor helper template to some other template, you wouldn't have to recompile all the code depending on that other template.
If you're doing template-heavy stuff, you can't overestimate that.
 
I have a platform which supervise these Questions-Bank Com
although I am looking for experts
 
how to access methods of a .cpp file withou class and namespace declarations?
 
@UriLukach I don't think anyone here will do that though
 
1:36 PM
@sbi yeah, not arguing in favor of its removal, really. I never used it, or even looked into the feature too closely
 
Maybe not...
 
??
 
but apparently the only company to implement it preferred that it got removed outright. I think if anyone has the right to make that decision, it must be them ;)
 
sbi
@jalf I think I argued the very same here not too long ago.
 
i tryied in a static way, but when using the file_name::method() it says the file_name is not a class and a namespace.
 
1:37 PM
If you do feel you have some interesting C++ questions to sell fell free to email me at uri @ lugo-test com
meant feel
cheers
 
@cyberrog no class = no methods.
 
@cyberrog that's not legal C++
 
@jalf It is my impression that they wanted a future module system to be unconstrained by export.
 
@jweyrich but it was being used before
by another classes. I hate work on other persons code. I havent write the code and I have to work on it, its hard to understand whats happening.
it says THE FILE HAS BEEN GLOBALIZED
 
sbi
@cyberrog You can't. This isn't Java, so class != file.
 
1:41 PM
@sbi Jame Kanze was also more than a little upset by words put in his mouth by Sutter. See also bourguet.org/v2/cpplang/export.pdf
 
Also, in C++ there are member functions.
 
0
Q: Kev Should Not Have Closed This Question

John DiblingReference: STDLIB and IO routines in C++ This is a crappy question, to be sure. It is long, ranty, and flame-fodder. It should have been closed, but not by a mod. It is not the moderators' jobs to decide on their own what is and is not proper content for SO. That is the job of the community.

 
Meh I still have further questions :( having a const member accessors like const getThing(const int& id) const; do I have to add const to the declaration in the header file and to the implementation in the c file?
 
@sbi what about the file being global??
 
Xeo
Hey @JohnDibling !
 
1:42 PM
@cyberrog There's no such thing as a global file.
 
@Xeo: Hey der.
 
Xeo
Are you by chance still composing your answer to my type erasure question? :)
 
@MartinhoFernandes looks like it works. I just imported it and called the method withou using an object.
Didnt understood why. It says the file was global.
 
The real problem is that you're using your own terminology.
 
global namespace
or global scope
 
1:44 PM
@Nils yes you do
 
:)
 
Well, I got caught up in something. :) Plus, I found a bug in my Variant class. Its not a design flaw in that the technique will still be the same, but I'd like to isolate and killt he bug before I pass it in to the world.
 
@cyberrog You #included a cpp file? That's a bad idea.
 
Xeo
@JohnDibling Well, you got 7 more days for a 200+ rep bounty now. :P
 
You'll be spammed by the linker in no time.
 
1:45 PM
@MartinhoFernandes there is no header file of that .cpp file.
 
@Xeo: Heh, I'll try!
 
sbi
@cyberrog There are no global files. In C++, files are mere containers for text. Compilers are presented this text in a pre-processed form and presume it to be syntactically valid code. They don't care at all how the code is spread over files.
 
@MartinhoFernandes wait I think I found it.
 
sbi
@cyberrog Then the functions in it likely weren't meant to be used by other compilation units.
 
@sbi yeah. thats what I was thinking.
thank you for the help.
 
2:03 PM
Looks like I'm pretty much alone in this one. meta.stackoverflow.com/questions/92508/…
 
@JohnDibling you can argue all day long with some people :)
 
Does anyone see my point here?
 
You're worried that mod votes are more powerful than 3k+ votes.
I don't mind.
I have seen many wrongly closed questions with votes exclusively by 3k+ voters.
And you've got a well closed question with a mod vote.
 
sbi
@JohnDibling Your first vote, and upvote, was mine.
 
hi @nils
 
2:12 PM
@JohnDibling I think you're fighting a futile fight. Some of us in this room have experience with this...
 
@nils please come to image processing room ..:)
 
@Martinho: It's fine if they only moderate questions you would have voted to close. But if they start moderating questions you would not have voted to close, then it becomes an "outrage." They have already overstepped their bounds by nuking the question.
@sbi thanks. :)
@Tony: Probably true. I have a little experience with it, and it was very dfrustrating.
 
ooooooooo @@@@nils; are you there/>?
 
the ping is not going to be any louder by using more at characters
 
@JohnDibling if you argue that a mod vote shouldn't be enough to close a question, I'm with you (and I have no idea why TPTB won't give them that option). If you argue that mods should not vote to close questions, I'll disagree.
 
2:21 PM
@Martin: Mods should be able to vote to close, just like a normal user. A mod's vote-to-close should not be binding. That's my argument.
 
I think you should have made that clearer in the question.
> It is not the moderators' jobs to decide on their own what is and is not proper content for SO.
Kinda passes the wrong message.
 
Xeo
5
Q: C++: is return value a L-value?

JohnConsider this code: struct foo { int a; }; struct bar { foo q() { foo f; f.a =4; return f;} }; int main() { bar b; foo i; i.a = 5; b.q() = i; } No compiler complains about it, even Clang. Why b.q() = ... line is correct?

this is... interesting
 
I know that if read it carefully, one can notice the "on their own" you put there, but...
 
So I've got a fun question, but one I don't feel like belongs on SO…
 
@Martin: Well, part of the problem is that until I opened that thread, I didn't realize that moderators don't have the ability to apply a single vote to close. I thought that they did, and that @Kev decided on his own that this question should die.
 
2:26 PM
Being on a team that, historically, uses Vim and g++ and make to compile, I've been wondering what a C++ project is supposed to look like in VS.
Is there a resource for guys like me?
Converting from the GNU toolchain (where directory structure on disk is paramount) to VS, where it seems to prefer one giant list?
 
Xeo
@AndresJaanTack You have filters in VS, so it's not really one giant list
 
@AndresJaanTack The structure of a VS project is virtual, you can create filters to correspond to the filesystem, or something else completely.
 
(What everyone else said)
 
So is the "recipe" that I just get rid of my on-disk hierarchy?
Or rather, do we have to choose either the VS way or the GNU-chain way? I suppose I'd rather that VS lets me keep the hierarchy.
 
It doesn't matter what the on-disk hierarchy is.
 
2:32 PM
@AndresJaanTack The disk hierarchy still matters. If foo.h is on folder bar, you need to #include "bar/foo.h".
 
@Andres: In VS, projects consist of a Solution, which is made up of individual Projects. The Projects contain source files that are compiled for that Project. A Project emits a single output.
 
@MartinhoFernandes Ah, that makes some sense…
maybe I'm alone, thinking that making the filesystem virtual is a bad thing.
Or, at least, finding it weird.
 
It's not making the filesystem virtual at all. It's a virtual representation used to organize.
You can use it to represent the actual filesystem, but that's not its intent.
For example, I like to organize files into header and definition (.h .cpp) "folders"
I also like to group together files that are related.
 
2:50 PM
0
A: Add a way for moderators to cast a normal, non binding vote

John DiblingA moderator's job is to intervene under exceptional circumstances, but they are still a member of the community just like the rest of us. We elected them because we trust their judgement. When a post is flagged, we trust them to decide if the flagged post warrants intervention and moderation. ...

 
@JohnDibling Great answer. (I'll upvote when I get home. Can't login to meta here. Long story.)
 
@Martin: Thx
 
@JohnDibling sb already downvoted and didn't say why...
 
Somebody.
 
2:54 PM
oh
lol, thought you had a way of telling who downvoted
 
3:21 PM
> I have a huge (100k+ lines, 5MB+) XML which acts as a database for my C++ Application.
The horror.
 
Xeo
@CatPlusPlus Now, where did I put my flame thrower...
 
0
Q: Good Option for XML Edit/Replace

Bhargav BhatI have a huge (100k+ lines, 5MB+) XML which acts as a database for my C++ Application. The structure of the XML is quite straight forward, for example, it has chunks of: <foo> <bar prop="true"/> <baz>blah</baz> </foo> The nesting of tags is several levels deep and...

 
lol screw it, i give up
 
@JohnDibling resistance is futile
 
this place really pisses me off sometimes
 
3:23 PM
oh you're not the only one
@CatPlusPlus shudder....
 
@CatPlusPlus that's about the average size of data our applications use to communicate between them. No XSD, no validation.
 
@CatPlusPlus ...huge XML ... database ... several levels deep ... regexes ... Why did you post that? You want to make me go blind?
 
@Raze ugh, you're unlucky!
 
@Raze XML has to be the worst format for intercommunication.
@MartinhoFernandes Because I'm evil.
Muahahaha.
 
a good blog title would be The failures of XML and why it should be abandoned
 
3:28 PM
@TonyTheTiger Listing things that XML did good is easier.
 
@CatPlusPlus it sucks. And most of our apps are tolerant to many omissions (it assumes empty elements most of the time)
 
@CatPlusPlus there isn't many...
not even worth summing up
 
@TonyTheTiger the problem is people don't get when it should be used, when it shoudn't, and most of all, how to effectively use it.
 
@TonyTheTiger That's why it's easier. :P
 
3:30 PM
@CatPlusPlus but it's boring :P
 
Hm, when XML should be used.
How about 'never'.
 
@CatPlusPlus provide perpetual employment to many? ;)
 
@CatPlusPlus so a blank page with the title Uses of XML is entirely befitting
 
@Raze You're thinking about COBOL.
XML isn't nearly as arcane to provide that kind of security. :P
 
The time I really got pissed off with XML was when I tried to go through a SOAP message that was created by a BPEL program.
 
3:33 PM
I got pissed of with XML when I had to use it in a C++ program, gosh the horror
 
Haha, SOAP. I love this thing. It's so ridiculous, you cannot not laugh when thinking about it.
 
@CatPlusPlus love-hate relationship with SOAP?
 
Some M$ project it was! Its supposed to be SIMPLE Object Access Protocol.
I wonder how a Complex Object Access Protocol will look like.
 
Did you mean COM?
 
@Raze it's actualy Shitty Object Access Protocol
 
3:35 PM
I like how sending a result like 42 takes up kilobytes.
 
@CatPlusPlus oh.... even worse... way too complex
@MartinhoFernandes wow! scary....
 
@MartinhoFernandes But 42 is not just any number.
 
@MartinhoFernandes Glorious XML features.
 
Atleast COM doesn't assume or claim that you can read the messages or that its simple.
@StackedCrooked Because it is THE answer?
 
It should be optimisable to <fourty_two/>.
 
3:37 PM
@Raze Yes, the answer to EVERYTHING. That's worth a few KB imo.
 
@CatPlusPlus But you need the damn freaking envelope.
Or something-
 
@CatPlusPlus it's describing the 42, so it has to say <Answer to the Ultimate Question of Life, the Universe, and Everything> 42 </Answer to the Ultimate Question of Life, the Universe, and Everything>
takes up some space
:P
 
@StackedCrooked considering the time it took to arrive at the answer, I guess so.
 
@TonyTheTiger Syntax error! :P
 
That XML is not well-formed :p
 
3:38 PM
Anyway.
 
And why do we have to freakin' repeat the tag name in the end?
 
@StackedCrooked what's wrong with it?
 
Why not just <foo>bar</>?
@TonyTheTiger Spaces in the tag.
 
That's not HUMAN READABLE.
 
@CatPlusPlus have you looked at REST?
 
3:38 PM
As opposed to XML which IS.
Or something.
 
@MartinhoFernandes ffs
 
Commas aren't allowed, either, IIRC.
@StackedCrooked What about it?
 
I haven't read the XML standard, unlike some of you sad people
 
only its soap, so it will be:
<soap><problem>
<problemdescription messageuse="" blah="">There was a problem</problemdescription>
<question>Ultimate Question of Life, the Universe, and Everything</question>
<answer refid="42424242"/>
</problem>
<answer id="42424242">
<author>Some Huge Computer</author>
<value>42</value>
</soap>
 
I haven't either, though I've tried to implement XML parser once.
 
3:40 PM
@CatPlusPlus Since you love/hate SOAP? I wondered if you tried REST..
 
looks like a buffer overflow occurred in a POC: <answer refid="42424242"/> LOL
 
@CatPlusPlus hah! I see evidence that the project that I'm working in once tried that.
and ended up with code to ouput XML, but not parse it.
 
@StackedCrooked I don't use SOAP, I'm just laughing at it. :P
 
I recently came to understand that XML is quite advanced, it's more than just elements and attributes.
 
std::cout << "XML";
 
3:43 PM
@CatPlusPlus In that case .. never mind :)
 
code that outputs XML
 
REST + JSON is a good way to build web services.
 
@CatPlusPlus I don't mind REST + XML, as long as the xml is kept simple
 
I haven't done webdev in quite a while.
 
Yeah, JSON is good. I hope people don't mess it up by making a "more powerful JSON 2.0"
 
3:44 PM
XML is a terrible interchange format.
 
@CatPlusPlus Why?
 
because people tend to not keep it simple for one.
 
@StackedCrooked It's way oververbose.
 
@CatPlusPlus it's a meta language... meta is always annoying...
 
And it doesn't offer any advantage over simpler formats like JSON.
 
3:46 PM
just ask @JohnDibling and some other about meta anything, they have experience :P
 
It's just way harder to parse.
 
@CatPlusPlus I would agree for most cases. But there are exceptions, for example I found that describing GUI's looks cleaner with XML than with JSON (I've tried both).
I like the use of XML in XUL. It's not too bloated.
 
@StackedCrooked Well, describing GUI is not interchange, is it. :P
I prefer describing GUI with code.
 
@CatPlusPlus I see.
 
And if I use an external tool that produces GUI description, XML is again not needed, because you won't be reading it.
 
3:52 PM
so what about WPF and XAML?
 
@TonyTheTiger I think XAML (and XUL) is an example where XML works well.
 
@StackedCrooked oh ok
 
XML schemas also allow to generate a C++ parser for XML documents. The CodeSynthesis XSD library does this ( codesynthesis.com/products/xsd ).
 
I just thought of something. When are we going to see a facebook hacking with the intent of character assassination through identity theft.
Cause it's so coming.
Someone logs into Bill Clinton's account and updates status. "That wasn't my dress and I did have sex with that woman."
 
sbi
@TonyTheTiger That is meta. A downvote means "I disagree". No need to explain this.
@Xeo If I misplaced my flame thrower, I'd look for it on meta. That's where it's commonly in use, anyway, so there's a good chance I forgot it there.
 
4:00 PM
@sbi but at least could say what your disagreement is
 
sbi
@TonyTheTiger Moderators should not have non-binding votes, obviously.
 
@sbi hmmm
 
sbi
(I upvoted. BTW.)
 
@sbi you said, earlier
 
sbi
@TonyTheTiger I'd be surprised, because I upvoted mere minutes before I posted that reply to you. :)
 
4:12 PM
@sbi oh, I thought you were talking about the post of @JohnDibling on meta, not his answer
or what were you talking about?
 
sbi
@TonyTheTiger I was talking about the answer @John linked to and to which you replied that somebody had already downvoted, but hadn't given a reason.
 
@sbi oh ok
 
4:36 PM
0
A: Add a way for moderators to cast a normal, non binding vote

XaadeI'd prefer that vote to close require two mods. Any single person having singular power, no matter how responsible and trustworthy, is flawed. It inevitably leads to a sense of arrogance in at least some portion of the collection of mods. As is an arrogant mod leads to anarchy.

Someone agrees.
I thought Judge Dredd already pointed this out.
 
Xeo
how can I search my own answers for a specific string? D:
 
0
A: Moderators should not close crap, flamebait questions, let the community

XaadeActing as a moderator, their only duty is to intervene when the community cannot: Banning harassing users Closing questions / deleting answers or comment threads that go off topic Removing content that would prescribe the SO community in a negative light to visitors (For example: an attack on ...

 
@Xeo Try is:answer user:me string
Oh my, I've hit the cap.
 
Xeo
4:55 PM
@CatPlusPlus thanks :)
@CatPlusPlus Me too, with a mere +15 rep. :(
 
@all Anyone want to give me a little feedback?
 
Xeo
0
Q: How to emulate C array initialization "int arr[] = { e1, e2, e3, ... }" behaviour with std::array?

Xeo(Note: This question is about not having to specify the number of elements.) This question discusses the uses left for a C array a là int arr[20];. On his answer, @James Kanze shows one of the last strongholds of C arrays, it's unique initialization characteristics: int arr[] = { 1, 3, 3, 7, 0, ...

 
@Xeo What about uniform initialization?
 
Xeo
@MartinhoFernandes Doesn't allow not having to specify the size of the std::array. :/
@Xaade, are you going to edit in an example?
 
5:10 PM
Can I use constexpr's on template params?
 
Xeo
@MartinhoFernandes constexpr applies to expressions, so, no ?
Wait, dismiss that
 
@Xeo : Variadic method should be obvious enough. It would be a method that takes in a variable amount of arguments, and adds to the array those values. Like I said, it's NOT intialization, but it's the closest you can come without C++0x syntax.
 
I can use consts, so I would expect constexpr's as well.
 
Why did everyone else delete their answers????
 
But then I didn't look at constexpr very much yet.
@Xaade Where?
 
5:15 PM
There were two answers explaining the C++0x initialization syntax, and both are gone. I wonder if they deleted in anticipation that the other answer was good enough.
 
Xeo
It's because uniform initialization doesn't cut it
 
define uniform?
 
Xeo
erm, nevermind that. Even so, initializer lists don't cut it too. :P
 
@Xeo Only because we can't use constexpr's on template params.
At least with GCC 4.5
I can't check the FDIS because the PDF seems to be gone.
Know any other place where it's hosted?
 
5:18 PM
@MartinhoFernandes Nowhere does that define the word.
It gives one type of example.
Wikipedia fail.
 
Xeo
Uniform as in applies to every type (that has an initializer list ctor)
@MartinhoFernandes Interesting, I tried to get the n3291, which is the one sent to the ISO committee and it remaps to a completely different pdf. :P open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3291.pdf
 
Oh, so you can put any type in the list, and it will accept it?
{ 1, 'a' }
 
Nope. It's not heterogeneous lists.
 
Xeo
@Xaade Huh? no, the types need to be uniform through-out the initializer list too.
 
what does uniform describe?
Uniform generically means everything is the same.
uni (one) form.
 
5:22 PM
The method of initialization.
 
Uniform implies that multiple distinct things share a 'form'. What would be distinct?
 
@Xaade How do you initialize an array member in C++03?
 
C-array?
So the distinct things are the different "types" (std::array<int> vs. std::array<double>)
uniform meaning they are all initialized the same way.
Now that is a definition.
 
In C++0x you can do it in the initialization list just like every other member.
 
@MartinhoFernandes in the declaration of the class?
You can't assign member variables in the class declaration.
 
5:27 PM
You had to do it in the ctor's body.
 
You can initialize them in the intializer list.

CClass::CClass() : m_int(5) { }
 
Xeo
Xaade, try initializing an array in the ctor's initialization list. :)
 
got it.
 
Hey in my CUDA program I have the data stored in a bunch of vectors and additionally I have for each vector a raw pointer which points to the device memory (memory on the GPU) since I got tired of managing all these things by hand I thought that extending std::vector might be a good idea, which I tried out like in the example here http://codepad.org/RdbvFlRb .

What do you think about that?
 
But you can't initialize a C-Array in the initializer list either.
So I don't understand your SO question anymore.
 
5:30 PM
Codepad is slow pastebin.com/g9BPDKXB
 
@MartinhoFernandes Eh.... cool!!!!! I didn't know that.
 
Should I post this on SO?
 
@Xaade The question is about initializing global or local arrays without explicitly specifying the size.
As in int x[] = {1,2,3}; vs std::array<int,3> x = {1,2,3};.
std::array forces you to write the size.
 
@MartinhoFernandes Like I said earlier. I can't intialize.... but I can assign... with a variadic method.
 
5:32 PM
Yes.
 
Xeo
@Xaade Several posted that written out already now. :)
 
Gotta go. See ya.
 
Xeo
bye @Martinho
 
@Xeo Sorry for repeating myself, but I'm simply implying that it's all the help I give, and understanding the situation more really doesn't change my answer.
 
Xeo
ahaha, @Matthieu's comment.. :) stackoverflow.com/questions/6114067/…
 
5:35 PM
Nobody loooked at my code so far :((((*((
 
Well @Xeo, I got people thinking in the right direction.
 
rlc
@Nils why not use a custom allocator?
 
@rlc For C arrays? or what exactly do you mean?
 
However, is a constructor necessarily initialization if it's in the body of the constructor? Yes the array is being initialized, but not it's members. The members are already initialized, too late.
 
rlc
for your adapted vector - it's almost always a bad idea to derive from a vector.. (or any other standard container, for that matter)
 
5:43 PM
@rlc Containing a vector is far better, and less maintenance work.
 
rlc
@Xaade his code doesn't contain a vector: it derives from a vector
 
@rlc That statement was in agreement with you.
You can forward type to members of a template can't you?
@Nils TemplateA<type T> ... { TemplateB<T> m_B; ... };
 
@rlc So you would rather use a vector as an instance variable?
 
@Nils Yes
 
@rlc What exactly is bad about extending std::vector in that way? I didn't change anything just added some functionality.
@xaade I think so
 
rlc
5:46 PM
@Nils well, if you intend to explicitly load/store to the mapped memory, yes. If you intend for the vector to have its memory mapped to the device, I'd use an allocator
 
No will do this by hand for now.. so I can be sure that memcpy/malloc is not called when it's not needed..
 
Woah, you can reply to a message after your message.... weird. Did I buy a time machine later?
 
rlc
@Xaade yes, but you will ;-)
 
What if a time machine only moved your consciousness through time. It explains why I feel like there's two [me]s sometimes.
 
rlc
well, my experience is that I don't know yet, I'll have told you when I'll find out ;-)
 
5:51 PM
Ah and I also wanted to ask about &(*this)[0] to access the array under std::vector is there a way to simplify this construct?
 
Wait. Didn't I already meet you before, or is this the first time we met. It's hard to say. Either way, I already know you. Wait, you're dead. Oh that's a horrible death. Well, at least you're alive at some point. Sorry for ruining the ending for you.
@Nils Getting the address to an element of the array inside the array's code (where this, specifies the array), right?
 
@Xaade I suggest you to try bughouse.stackexchange.com.
 
@Xaade it's not actually inside the array's code.. it's inside the array's wrapper's code
 

« first day (220 days earlier)      last day (4720 days later) »