« first day (246 days earlier)      last day (4928 days later) » 
00:00 - 20:0020:00 - 00:00

00:19
0
A: passing heavy objects C++0x

FredOverflow In this case is this the most correct way to code this? Actually, it is the "least correct" way: you are returning a reference to an automatic object. When the function returns, the client receives a reference to an object that no longer exists. There is no difference between lvalue referen...

@Xeo Many languages have lvalues and rvalues, but they mean different things in different languages :) Just like "object" has quite a different meaning in C++ compared to other languages.
@FredOverflow Just letting you that I learned my lesson after this question and I upvoted that answer.
:)
@FredOverflow But the meaning of 'object' is a holdover from C
@LucDanton So? I was simply pointing out that "X" can have different meanings in different languages. So asking "Does L have X?" can also be meaningless :)
For example, ask a Java programmer if Java has multiple inheritance.
"Of course it has!" and "No, it does not." are both valid answers, depending on what you mean by multiple inheritance.
Does C++ have interfaces?
No special language support for it, so no. Or, no special language support needed, but yes.
It doesn't feel right. That's like claiming that one has to be careful with the meaning of 'class' because it might mean 'a group of pupils'. 'object' as in the C standard is not even the same problem domain :(
C++ differentiates between "object", "class object" and "object of polymorphic type". What kind of object are you talking about? :)
Xeo
Xeo
00:34
@FredOverflow class object{}; :)
The one that is the in C standard, duh
I don't see your point. "object" in C and "object" in C++ are quite similar, aren't they?
> The constructs in a C++ program create, destroy, refer to, access, and manipulate objects. An object is a region of storage.
Yes. The C++ Standard is trying to be consistent with C on this.
So what do you mean by "'object' as in the C standard is not even the same problem domain :("
As the other, usual meanings of object.
00:37
You mean like "an instance of a class"?
JavaScript has no notion of classes :)
'Region of storage' is almost the language of the implementation by comparaison
Notice the plural 'meanings'
Anyone here interested in
207
Personal Productivity & Organization

Proposed Q&A site for people wanting to improve their personal productivity.

Currently in commitment.

We need one more... :)
If we were interested in productivity, you would find us over in the C# channel ;-)
2
00:42
0
Q: Connecting std::set<T> to a memory pool

StackedCrookedI am currently experimenting with custom allocators. I have a small application that implements a custom allocator with a memory pool. It works with std::vector but when I try it with std::set I get a runtime error: typedef std::set<Data, std::less<Data>, my_allocator<Data> > ...

For the scholarly.
@StackedCrooked What do you mean by 'registered'?
@LucDanton the Pool class will register itself into a global list of pools (per type). You can find the details in the code.
Then you want a scoped allocator I believe
Xeo
Xeo
@StackedCrooked Maybe register a new pool if the rebind struct is instantiated?
@FredOverflow Or doing something productive, perhaps.
00:46
@Xeo I could perform a sort of lazy-instantiation, yes.
@Xeo however, then I need to specify a pool size.
@Xeo ok, but I can use the same size as the orig pool. I'll try that. Thanks! :D
Damn, that won't work. I have no access to the orig pool size there.
These functions are called only for the container’s element type, not for internal types used by the container. [ Note: This means, for example, that a node-based container might need to construct nodes containing aligned buffers and call construct to place the element into the buffer. — end note ]
This means that your allocator should only be used for Data
Not sure if that's new to C++0x
@LucDanton is this a bug in the STL implementation then?
No, it's me being not awake enough
it's about constructing -- not allocating
And what would be the purposes of passing an allocator if it's not used to allocate heh
@Xeo @Xeo I misunderstood. The rebind struct. Interesting...
Good morning :)
Anyone out there?
01:01
@StackedCrooked Out of curiosity what happens if you comment out rebind?
@LucDanton :
/usr/include/c++/4.2.1/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<Buffer<128u>, nonstd::allocator<Buffer<128u> > >’:
/usr/include/c++/4.2.1/bits/stl_vector.h:163:   instantiated from ‘std::vector<Buffer<128u>, nonstd::allocator<Buffer<128u> > >’
main.cpp:205:   instantiated from here
/usr/include/c++/4.2.1/bits/stl_vector.h:79: error: no class template named ‘rebind’ in ‘struct nonstd::allocator<Buffer<128u> >’
/usr/include/c++/4.2.1/bits/stl_vector.h:96: error: no class template named ‘rebind’ in ‘struct nonstd::allocator<Buffer<128u> >’
I think I'm going to pour over the C++03 Standard, there's too much difference with C++0x
Even both set and vector need it.
— All instances of a given allocator type are required to be interchangeable and always compare equal to each other.
So your allocator is not C++03 compliant
Or is it?
@StackedCrooked Is what you call my_allocator in your question allocator in the link you provided?
Xeo
Xeo
4
Q: Is the typedef-name optional in a typedef declaration?

David Rodríguez - dribeasI was quite surprised when I saw the following code compile without errors or warnings in g++-4.2: typedef enum test { one }; My assumption was that if you used the typedef keyword it would require an extra identifier as in: typedef enum test { one } test; As already mentioned, g++-4.2 acce...

01:08
@LucDanton Yep
@StackedCrooked I think the problem is that your Pool does too much
I have a little problem with SEGSEGV in my C++ code. It is a native library for Java and when I call it from the one class it works great and from another class it breaks done. What is the best way to find the trigger?
You could have a type-agnostic Pool that gave type-agnostic memory and an allocator type that took care of fiddling with types.
But I need more information: what is the goal of pooling the memory? Locality?
Xeo
Xeo
@LucDanton Speed it seems.
Allocator tuning for std::set doesn't seem easy I have to concede
@H3llGhost Is using a debugger possible at all?
01:18
@LucDanton I don't really know because it is Android with running the library. But perhaps it is a general issue in my code
Oh my god ... My English is so bad, today -.-
I don't think I'd ever try to do C++ without a debugger, sorry.
:)
I will create an environment and test it there
@H3llGhost Do you have the code for the library?
strace is a good choice isn
't it?
Yes but it is a lot
Well, identifying the line, or at least the call that causes it would be a start.
Xeo
Xeo
01:24
@LucDanton That's somehow sad for C++, isn't it? xD
What's not to like about debuggers?
@MartinhoFernandes I know the last call but it doesn't help me
@LucDanton For starters, needing one means you have a bug.
Which is a bit unpleasant.
No, having the bug is unpleasant :)
Oh yes -.-
I must correct myself, I'm not sure what is the last call
There are two possibilites because I am not sure which of the methods is called first
In general I can exlude one possiblity because it is only a mutex unlock
01:40
@LucDanton you have a point. Making the pool a non-template could probably fix my problem.
Here is the method which I think trigger the seg fault:
`JNIEXPORT void JNICALL Java_de_dhbw_file_sha1_SHA1HashFileAsyncTask_calcFileSha1(JNIEnv * env, jobject jobj, jstring file)
{
	callEnv = env;
	callObj = jobj;
	callClass = callEnv->FindClass(CALL_CLASS);

	jboolean jbol;
	TCHAR* szReport = new TCHAR;

	__android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "Version [%s]", "19");

	const char *fileName = env->GetStringUTFChars(file, &jbol);

	__android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "Filename: [%s]", fileName);
It must happen after the debug output "Generated hash"
Xeo
Xeo
@H3llGhost What an absolutly ugly name!
What? You mean the method name?
Xeo
Xeo
Yes. :)
I had no other option. The system needed this naming convention.
01:49
No debuggers, silly naming conventions... You're from h3ll alright.
Oh no ... the naming conventions are from oracle ... I know there aren't really nice
Yeah the debugger is missing because I deleted my system the last days
I hadn't enough time to install my linux vm again
I must correct myself again the fault doesn't appear in the above code. Now I haven't any idea
What happen when I try to unlock an unlocked mutex or to free a locked mutex?
For Posix mutexes, this is a precondition violation so probably Bad Things Happen.
> Attempting to destroy a locked mutex results in undefined behavior.
In other words, it makes you girlfriend pregnant.
If it had one :P
Okay how can I check it? There aren't any methods
ähh... functions
I think it's more appropriate to review the design: why are you trying to destroy mutexes that might be locked?
Even if you somehow manage to safely destroy a mutex only when it's unlocked you still run the risk that someone else might then try to use it, no?
01:59
it was only an idea because I don't know how JNI handles loaded libraries
@LucDanton Yeah, like whoever locked it, coming back to unlock it.
Destroy the puny mutexes!
Unlocking a unlocked mutex isn't the problem
Why is the fault address 0000000 and sometimes a "real" address?
Is the stack trace a helpful information?
02:26
What is the better choice having global variables or class fields?
The correct one.
I know that sounds like a stupid answer, but it's the truth.
Is this thing supposed to be global?
Or per-class?
Wow, now it seems we can't use regular expressions to implement parsers. stackoverflow.com/questions/6400044/…
Thanks for the advice I will "fix" it
It is sufficient to initialize a Java string object with jstring abc;?
From Java?
No. It will be null.
I am right that null is no memory allocation?
03:03
I guess.
Come on people, ask questions! I need to collect 5 upvotes!
:P
Do you know how to initialize the jstring properly?
Cool, my memory pool now gets speed improvements of up to 2.4x.
@StackedCrooked Did I recommend GC to you already?
How do you add garbage collection to C++?
Boehm GC is a popular collector
It may even be available on your distribution
03:14
$ sudo emerge boehm-gc
And you're set :P
alternatively sudo apt-get install libgc-dev
@LucDanton Bah, binary-based distros suck.
Heh I just realized you can use e.g. the Boehm GC to tune allocation performance while the allocators tune for locality
 
4 hours later…
Xeo
Xeo
07:02
0
Q: How to static_assert in member templates only when actually used?

XeoConsider this simple class: template<class T> class Foo{ public: Foo(T const& val) : _val(val) {} template<class U> Foo(Foo<U> const&){ static_assert(false,"Cannot convert from Foo<U> to Foo<T>."); } operator T&() { return _val; } o...

hi, is there any way I can read data dumps of closed sites?
In the Area 51 page for that site, there's a link to the dump.
I mean, used to.
@Xeo I believe GCC is conforming
Xeo
Xeo
07:18
Meh, thought of a solution already
template<class>
struct fake{ static bool const value = false; };
// ...
static_assert(fake<U>::value, "....");
Just to make it dependent on a template type and to delay parsing
Xeo
Xeo
Made total sense once I reformulated my question in my head to include "delayed parsing"...
You can use the existing false_type thingy.
Xeo
Xeo
template<class> struct fake : std::false_type{};
?
Sounds good aswell
There's std::identity to make something dependent but I don't think it's convenient here
Xeo
Xeo
07:23
@LucDanton Isn't that removed in C++0x?
Heh it's not in n3242
Xeo
Xeo
not there or not removed?
Well I can't tell
n3242 is annotated relative to whatever was the immediate previous working draft
No idea what identity was in if it ever was
n3290 has no mention of std::identity.
Seems so arbitrary to not include it just because it has no more use for std::forward :(
Xeo
Xeo
07:37
@LucDanton Why exactly is it gone?
I imagine because nowhere in the library is it needed to suppress template deduction/make a type dependent. But that's just speculation on my part.
Also I don't know if it's 'gone' proper, for all I know it never left the proposals and was not included in any draft
Xeo
Xeo
And why isn't it needed for std::forward anymore?
8
Q: Why use identity in forward definition for C++0x rvalue reference?

user643722In A Brief Introduction to Rvalue References, forward is defined as follows: template <typename T> struct identity { typedef T type; }; template <typename T> T &&forward(typename identity<T>::type &&a) { return a; } What purpose does the identity clas...

Is where I got some information
Xeo
Xeo
Ah, so it uses remove_reference
 
3 hours later…
10:14
morning
nubs
if you think you could help me figure something out something about memory management in recursive algorithms, could you take a look at this thread please? stackoverflow.com/questions/6394984/…
i really have no idea what to do
@LucDanton I find it easier to write clean, correct code from the start than trying to debug messy code.
Well okay
I know the basics of how to use a debugger, but is has never helped me fix a single problem.
Seriously?
10:28
Seriously. I prefer staring at code and thinking :)
And testing. And more testing.
Well, I tend to couple testing with debugging
And assert. In my view, assert is heavily underused.
When a test fails, might as well go check why
Well yes, but I can usually do that by looking at the code.
I find looking at the code from the debugger helpful for some classes of bugs
10:31
It's funny, if you read "Coders at work", many professional coders, like Joshua Bloch for example, don't use debuggers :-)
That's not funny at all!
Debuggers are wonderful tools! I just never found them particularly helpful for me.
Maybe they become increasingly important when you try to debug code that someone else has written? Dunno.
Hah, I was about to ask you: how do you tell if e.g. a segfault is related to something you just did or comes from somewhere else
You could also say, if a program is so complicated that you have to debug it, maybe it's time for a rewrite to make it simpler ;-)
@LucDanton There are no segfaults in Java, and I do most of my work in Java :-)
Well, be fair: my comments addressed working with C++ (and I'd extend that to C, too)
10:37
I once saw someone who was very proficient with the Visual Studio Debugger demonstrate it. I was deeply impressed.
I have heard many legends about how crappy the other debuggers are in comparison
Well, GNU debug sure sucks in comparison to the VS debugger...
If you google for "gdb" in Germany, the first result is "Grad der Behinderung", which roughly translates to "degree of disability"...
4
I want delivury :(
so @FredOverflow has been taken over by C# ?
i'm currently looking for a coffee machine. to make nice cappuccino and espresso
I hate coffee
lol
0
Q: Wanna have a nice coffee machine

Johannes Schaub - litbI want to buy myself a coffee machine so I can get nice and tasty coffee throughout the day. Basically my goals are Don't really want to invest half the day in front of my machine, experimenting with all sort of weirdness Do want excellent and nice looking coffee. Do want to have milk foam. Do...

11:31
@JohannesSchaublitb what about nespresso?
not completely sure about pricing though nespresso.com
11:56
those letters are quite lols
yeah
 
1 hour later…
13:24
@Default wasn't aware of nespresso machines yet
13:36
humph
what the hell kind of day and age is this if you can't find a product from it's international barcode?
What is the correct term for an operation that does nothing (inside an english text)? no-op, noop, no op or nop?
NOP is the assembler instruction
I know, that's why I said "english text" :)
no-op would be the usual in English, I would say
13:44
@JohannesSchaublitb both my mother and brother have one and are very happy with them :) although you have to buy capsels with coffee.. but it's completed in.. well.. seconds
14:04
@FredOverflow Not sure any one of them is more correct than the others. I usually use no-op or nop
14:43
0
Q: Object destruction in C++

FredOverflowWhen exactly are objects destroyed in C++, and what does that mean? Do I have to destroy them manually, since there is no Garbage Collector? How do exceptions come into play? (Note: This is meant to be an entry to Stack Overflow's C++ FAQ. If you want to critique the idea of providing an FAQ in...

request for feedback
My feedback is the same as with most of the FAQ "questions". Why? What, apart from self-congratulatory C++-masturbation, is the point in answering questions that people didn't actually ask, and why does it belong on SO of all places
noted :)
;)
there is a certain irony of marking something as a "frequently asked question" when you had to write the question yourself because no one else actually asked it. ;)
Well, I have asked myself this question many times :)
@FredOverflow i like your most recent doings!
14:53
hello all
@JohannesSchaublitb Even the stupid Java questions about concurrency? ;-)
mkay, back to trying to beat my code into submission. Trying to refactor some code that just keeps being ugly and overcomplicated
4
Q: Object destruction in C++

FredOverflowWhen exactly are objects destroyed in C++, and what does that mean? Do I have to destroy them manually, since there is no Garbage Collector? How do exceptions come into play? (Note: This is meant to be an entry to Stack Overflow's C++ FAQ. If you want to critique the idea of providing an FAQ in...

@FredOverflow there should be anchors in your answer, hehe..
nothing mentioned about base class destruction?
15:12
@Default Good point, I'll put it on my TODO list.
wtf
I sucked a lozenge on the top of my mouth and now I can't get it off.
what?
@FredOverflow you say " If, during stack unwinding, another exception is thrown, program execution is aborted by calling the function std::terminate", though that is only true if the thrown exception escapes a destructor
you are entirely fine with throwing an exception while the stack is currently unwinding, by itself
@JohannesSchaublitb good point, noted.
Joshua Milton Blahyi (born September 30, 1971), better known by his nom de guerre General Butt Naked, was a fiercely violent and eccentric leader for the Liberian warlord Roosevelt Johnson in the First Liberian Civil War in the first half of the 1990s. He was originally a tribal priest, and returned to preaching after the war. Early religious beliefs Blahyi is a member of the Sarpo tribe in Liberia. At age 11, he claims, he was initiated as a tribal priest and participated in his first human sacrifice. During the course of the three day ritual that followed, Blahyi says that he had a vis...
just wtf
15:18
lol
sounds like very strange man...
yeah
you could say that
@JohannesSchaublitb I wish... never really got into C#, but what I've seen so far excites me :)
@FredO: It's Java, but they retro-actively realized that Java's design was fucking stupid and tried to patch it over desperately
Plus it has LINQ!
What I really don't like about Java and C# is the polymorphic equals(Object) method which allows comparisons with any Object (meaningless) and makes the implementation of equals ugly (type-checks and downcasts, brrr.....)
not saying that some of the patches, like LINQ, aren't pretty sweet :P
but Object, and a bunch of other stuff, is fundamentally bullshit and they can never fix it
15:31
> to a certain extent I prefer guys over girls. Guys rather punch you when you say something wrong, but with women you have to find out first what you did wrong, then apologise, then explain why you are a bastard, and then buy her a gift
the HTML injection one is much funnier
What would you respond if someone said C++ was nothing but patch after patch onto a fundamentally flawed design?
Because many people seem to think so :)
@DeadMG But you can't tell that at a party ;)
Well, being based on C is a fundamental flaw, for one.
well, I'd say that firstly, maintaining source compatibility with C is a much higher compatibility standard
i.e., at least C++ gained something for it
secondly, C++ didn't rip it's design from another language where it was bloody obvious that it sucked from the beginning
@DeadMG Yes, it wasn't stillborn. That's something :)
Java sucked from the beginning, and it was obvious? Really?
15:36
well, if you consider that in 1998, C++ was Standardised, so we had templates and that shiz at that time
then you compare it to Java, and yes, I think it's quite obvious that it sucked
Ah. Yeah, generic programming in Java really sucks.
If you can even call it such.
Java's design just sucks, full stop
because the programmer has no power
so if Java doesn't provide a perfect solution, then you're fucked
It also means stupid programmers can't fuck up as often ;) But then again, maybe those programmers shouldn't have become programmers in the first place.
agreed
if the programmer is an idiot, it's his own fuckin' fault
now there's a difference between that and requiring omniscience, read, C-style memory allocation
15:39
which is, hilariously, what you do in Java with files and stuff
higher-level my flabby asshole
You mean this? :)
7
Q: Handling IO exceptions in Java

FredOverflowBasically, I want to open a file, read some bytes, and then close the file. This is what I came up with: try { InputStream inputStream = new BufferedInputStream(new FileInputStream(file)); try { // ... inputStream.read(buffer); // ... } catch (IOExcept...

flabby asshole?
> Oh, no! My answer is being hijacked by C++ advocates. =) – vitaut
LOL
I can't call a language where you cannot pass a function to another function high-level. Even C can do it, and Java somehow doesn't. And it's painful. :/
Cue thousands of interfaces and inline classes.
indeedy
15:44
@CatPlusPlus I'm sure one could come with a "pure OO" argument against passing functions to functions ;-)
who gives a shit?
purity is a worthless subjective adjective of no value whatsoever
unless you want to use it scientifically, of course
@DeadMG cargo cult OO programmers :)
> My language has no lambdas, and still I can do everything, so they must be useless!
Xeo
Xeo
16:06
Omg. The whole time I thought there was nothing going on in this chat, because SO didn't show me that there are any new messages. But there were. :(
failcakes
cakes made of fail
little bundles of fail, all baked, topped, and wrapped, with "Xeo" written in icing on top
16:18
now someone needs to pass the breaking-changes to reddit xD
to have the raging nerds troll start
Xeo
Xeo
@Johannes, read the comment-reply from @Ben on @Tomalak's answer?
@Xeo ohh I see!
didn't notice.. lulz
Xeo
Xeo
Yeah, me too at first.
It is a trap, though.
Why are people still using VC6?
16:32
@Xeo this begs the question how to interpret "named object" when all that is there is an unnamed parameter.
The auto or register specifiers can be applied only to names of objects declared in a block (6.3) or to function parameters (8.4). They specify that the named object has automatic storage duration (3.7.2).
1
A: C++ Cache Design Advice

NodePerhaps you could do something using the Boost.MultiIndex container? It would allow you to make a type that stores the image data, and details of how it was manipulated, then lookup values based on whatever combination of keys you want. If you haven't used it before, it could seem a bit dauntin...

Can anyone think of a better solution to the OP's question here?
im sure there must be, but thats the best I could think of right now
but I suspect it means in the second sentence "They specify that the named object or function parameter has automatic storage duration."
Xeo
Xeo
I don't understand the need for the template keyword before dependent templates. Can't the compiler just look if there's a < coming after the identifier?
@Xeo: Except that < can have other meanings
for example, if the identifier is a static integer, you could be performing a comparison
and because of the lax nature of the syntax, then it would be perfectly legal, too
int i; i<i>(i); // well formed
Xeo
Xeo
16:49
Meh, the syntax should support the sane, not the insane...
If the identifier is a template, then one can also have different meanings.
it's easier in C++0x
template<typename T> struct A { template<typename U = int()> static bool f(U) { return false; }; template<typename T> bool g() { return !T::f<int()>(0); } int main() { return g<A>(); }
Xeo
Xeo
Okay, and why is the template suddenly not needed?
this returns false. But if you replace T::f by T::template f, it returns true
because T::f has a default argument. so the < doesn't need to be considered as a template argument list introducer. The !T::f will just yield the value false.
and the < will be less-than etc
Xeo
Xeo
meh
if you insert the template, then it's a plain normal function template call and the int() will be a function type instead of a zero
Xeo
Xeo
16:56
Ah, now I get why you choose a function signature as an example
evil stuff is evil.
it's not completely well formed C++0x because it relies on some behavior that (afaik) most implementations implement but is not allowed by the spec. but it's possible to even write a conforming C++03 test where different behavior is possible
namely, gcc accepts this:
template<typename T = void> void f(); template<typename U> void g(U) { } int main() { g(f); }
strictly, it is not allowed to. We would have to call g using g(f<>). clang follows the strict c++0x rule tho :(
Xeo
Xeo
Huh?
You know what I want? template<auto X> ... :|
when taking the address of a function template, if we don't have a target type, then the spec allows that the address still resolves, but does only "if a template argument list is specified [...] then the template-id is an lvalue for the function template specialization"
the whole text implies it requires a template-id, for whatever reason. even if the argument list is empty. I'm not sure why that restriction is there, though
i think the wording was drafted before there existed default arguments, perhaps that's why it requires an argument list. when they added default arguments, they didn't grant for leaving the "<>" off. but that's just a guess.
Xeo
Xeo
17:08
Not having to type <> would make some stuff certainly look nicer
Hi has anyone experience with gdb and android emulator?
Xeo
Xeo
6 hours ago, by FredOverflow
If you google for "gdb" in Germany, the first result is "Grad der Behinderung", which roughly translates to "degree of disability"...
Not that gdb :P
I mean the debugger because I am trying to debug native code for android
I search for the reason of the SEGSEGV
Xeo
Xeo
Sorry, can't help with that. :)
Hmmm, nice. It seems part 6 of STL's advanced series is about a generic way to printing STL containers and pairs / tuples, inspired by @KerrekSB
In general debugging with JNI is also okay
And it is faster than Android ^^
17:22
Hi all, I need to ask someone for their smtp server information, including host, password, etc. But they won't know what smtp is. So what do I do?
I dont think its gmail. They have server in an office.
17:37
Fred You still around?
Xeo
Xeo
anyone else having trouble compiling with ideone right now?
ah, now..
 
1 hour later…
18:53
-2
Q: beautiful c++ code examples

user11697Could you recommend me some source codes (in articles or in some open-source projects), which are easy to understand and shows beauty of c++ language (using templates, design patterns). I've tried to look to the sources of firefox, qt, notepad++ and other open-source projects. But they are very h...

Asking the impossible?
Depends on how you define 'beautiful code'.
If you define it as "ugly", I guess it's an answerable question.
Then it depends on how you define 'ugly'. :P
Xeo
Xeo
If you define it as "beautiful", I guess we got an infinite recursion.
Okay, FF5 coming in 2 days.
Trying to catch up with Chrome's version number?
19:06
You can't catch up with infinity.
In case you haven't seen this recent interview with Bjarne: csi-india.org/c/document_library/…
19:18
The interviewer asks strange questions, like: "How can C++ ensure that object orientated paradigm is followed and not the cookbook style procedural workflow? " I wish he asked this question to Stepanov instead of Bjarne. That would be so much more entertaining.
hello dudes
ok i assume this is not the right category but high level languages have all something to do with lower ones
right ?
sorry my english
anyway I try to make an assembly programs
just to have the basis of
but I'm not sure what assembler to use
and be sure it is going to assembling my program in my chip instruction set
Window
but I can switch on Unix
19:51
Say, I have a std::istream_iterator<int> it(...);. I want to std::copy the next n values from it. I can't use it+n for the end iterator :(
Xeo
Xeo
@MartinhoFernandes isn't there copy_n?
15
Q: std::istream_iterator<> with copy_n() and friends

wilhelmtellThe snippet below reads three integers from std::cin; it writes two into numbers and discards the third: std::vector<int> numbers(2); copy_n(std::istream_iterator<int>(std::cin), 2, numbers.begin()); I'd expect the code to read exactly two integers from std::cin, but it turns out t...

6th result with googling std::copy_n xD
Seems like it's not part of C++03. :(
I can't use C++11 for this :(
00:00 - 20:0020:00 - 00:00

« first day (246 days earlier)      last day (4928 days later) »