« first day (476 days earlier)      last day (4478 days later) » 

@AzzA Yup, just finished. The introduction I already knew from another talk, but the style guidelines were "new" (in the sense that I haven't seen him talk about them before).
 
I'm enjoying not only the logic, but the manner of his speech, I've never heard him before in long talks.
 
12:21 PM
Yes, I enjoy hearing him talk, too. He does the occasional mistake in talks, but then again who doesn't?
For example, saying that the fake move semantics he had been using for 10 years is achieved by having the copy constructor move by default and only move when explicitly told to; the first "move" should clearly be a "copy".
 
@FredOverflow I'm just getting to that part.
 
@FredOverflow auto_ptr doesn't copy IMO
but it moves also when not explicitly told to
 
He was talking about "move constructors" for classes like Matrix handles.
 
"Finite-State Machine, which is really a diagrammatic representation of a State Pattern"
 
anachronism?
> What is binding, and why is it always either early or late? Can't it ever be on time?
8
 
12:39 PM
hello how can i read a file.txt that contains different length of rows in C++.
int edge;
ifstream fin;
fin>>edge will only read first number
 
I just love Eclipse CDT. Such a smart, intuitive editor...
 
and if i do a loop it will read same length of rows but my rows are differnt in length
 
@mona Read a string, convert string to ints.
 
@mona Is this homework? If it is, people can give you hints and help you. Otherwise, posting an example of the file format to parse can help giving solutions.
 
no no it is not a home work im doing a project and i need to read some different length arrows from a file
i used to read some files with same length so i was doing a loop
but now i cannot do a loop anymore because i have differnt lengths
1 2 3 4 and 1 2 3 4 5 ..
 
12:42 PM
or have two loops - outer going over lines, another over ints in a line until '\n'...
 
i think iwill do that but i should serach for 2 \n
 
why 2?
 
because my numbers are separated with \n
1 2 3 4
1 2 3 4 5
 
Can you paste an example file on e.g. ideone?
 
so each number is on its own line?
 
12:44 PM
yes but i need to have 1 2 3 4 in a file
and 1 2 3 4 5 in another
because different length
so i should search for double space
 
oh, well, no then... they are not separated with '\n'
 
ohh right
thanks for your help :)
 
read a number, peek a char after it - if it's whitespace - read next int.... if it is '\n', get to new line and new array
 
exactly thank you guys
 
:)
And, speaking of Eclipse, I adore my syntax color scheme... I think, it's very Monet-like...
 
12:50 PM
@mona The 'straightforward' way seems to work.
 
Except for the nasty red patches, where Indexer cannot resolve windows headers... those damn __declspec(dllimport) __stdcall wrapped in macros in dbghelp.h are killing me :(...
@LucDanton Your "straightforward way" must look scary to someone who is not sure whether numbers are separated by '\t' or '\n'...
 
@AzzA Doesn't matter, extraction operation takes care of that.
 
I think, he wanted each line from a file as a separate array of ints though...
I might be wrong though, maybe he wanted to read each line into the same tmp array...
 
sorry i was away, i have rows from different length. I need to write the ones that have 5 numebrs in a file and the one that have 6 in another....
so i need to read each line and check the size and write it in the correct file
 
count number of separators in each line (whitespaces)... 5 number line has 4 spaces, 6 line number - 5 spaces...
 
1:01 PM
Then I'd favour the approach Azza originally outlined: read the line, then parse the numbers.
 
dump whole line into appropriate file...
unless you actually need to access those numbers as integers
 
i will see what to do thanks for all the solutions :)
 
:)
 
Thanks
 
user784668
1:46 PM
memsetting a non-POD is undefined, right?
 
user406009
Yeah.
 
user406009
Most things in C++ are undefined.
 
user784668
@EthanSteinberg This I do know.
 
@EthanSteinberg except for the things that are unspecified, implementation-defined or well-specified
 
user784668
@FredOverflow The lattermost ones are too rare to worry about them.
 
1:50 PM
You seriously think well-specified is a rare case? :)
 
user406009
Well compared to other languages when almost the whole kitchen sink is specified.
 
Okay, but that's a different statement.
 
Xeo
2:04 PM
So, it's weekend, 3PM, and I just woke up.
 
I've been awake since 10 am or something.
 
2:19 PM
Hans' talk was quite interesting. Now on to the rewatch of STL.
 
Xeo
@FredOverflow Yeah, but as James said, it was "quite racy" :)
 
In what sense? Too fast?
 
Xeo
His speech pace, yes
 
Xeo
2:38 PM
@sbi Wasn't there a discussion about this sometime yesterday? bbc.co.uk/news/magazine-16870579
 
JK.
@man of one way Hola! Que tal?
 
@JK JK The damaja!
 
JK.
word
 
@JK Fint att du fixade assignment =)
 
JK.
supportärende brb
word
 
2:48 PM
@JK Vi tänkte sitta i morgon i skolan å köra på med olika grejer, du får gärna joina om du vill =)
vi kommer väl iofs lägga vikt vid distribuerade system
 
sbi
@Xeo Indeed!
 
Xeo
@ManofOneWay, @JK, please keep it English in here
 
Is priority some kind of a fuzzy logic?
 
Xeo
3:08 PM
> +1: Didn't think I would upvote an answer that mostly looked like the poster had fallen asleep on his keyboard. Ani
 
JK.
@man of one way What's happening?
@man of one way Did you go out for a couple of brewskies yesterday?
 
@JK you know it baby
 
svensk?
 
JK.
@man of one way Awesome.
@Dzek You know it baby
 
:D
Where are you from, babies? :D
 
JK.
3:12 PM
@Dzek Uppsala
@Dzek u?
 
Gothenburg ;)
small town, 130 kms from Stockholm
it's not that big Gothenburg, we are all mixed with
:D
 
JK.
@Dzek ok never heard of
 
Realy? GT is the biggest ferry port in Sweden, and you have never heard of it?
 
JK.
Nah only the big Gothenburg.
 
:(
we were once very proud community. Now big Gothenburg took all our glory.
 
3:17 PM
@JK händer ikv?
 
No one even knows about us. :(
 
JK.
@man of one way Chillin bit on villian...u?
 
@DzekTrek u drunk?
 
JK.
@Dzek you still have your small town spirit, thrive on that
 
@JK nice, I'm just gonna relax.. Hopefully do some more on the oracle project
 
3:18 PM
lol, nej
why?
Yes, but Gothenburg put us in the shade. We are no one now, just because they have around 300, 000 more inhabitants than us.
 
Xeo
@sbi And btw, yeah. Count me in on the fun. And apologies for "stealing" your prefix. :)
 
our small town has only 2,450 inhabitants, but all of our citizens are amongst strongest Swedes on the Earth
 
JK.
@Dzek :)
 
@JK take your Wii and come over!
 
JK.
@man of one way My Wii is at my parents
 
3:23 PM
Our progress is unstoppable. We once had a milk collect station, now we have milk factory. Also local officials are thinking about opening a small bakery too.
 
@JK Dags å fixa skype!
 
is glow lib good to be tested?
 
why is Gadget passed by value?
 
user406009
Because the code obviously intends to modify the Gadget.
 
user406009
And return a newly created Widget.
 
user406009
3:34 PM
My bet would be that it rvalue-moves the Gadget inside the new Widget.
 
Xeo
@AlfPSteinbach Because we can.
 
user784668
2
Q: How to implement operator=() for a class that has a reference member variable?

PhilluminatiI want to have an object that contains a reference, and put that object into a vector... Must I use smart pointers instead of a member references in any object I want to push into a vector? This was what I wanted to do: #include <string> #include <vector> using namespace std; class...

 
user784668
Oh yeah, smart pointers.
 
sbi
@Xeo Using the same prefix as I do is fine with me as long as you use a different suffix. :)
 
user784668
What's wrong with using raw pointers as mutable references?
 
3:46 PM
@Fanael Because it's made of pain.
 
Xeo
You can't have assignment if you have a reference member that referneces an external entity, over and out
 
Yeah, that shit shouldn't be assignable at all.
 
Xeo
If you want to be assignable, then you also want a reseatable reference, which is a raw pointer.
 
@Xeo no, you can have operator=, but you can't assign that member
 
Xeo
@EtiennedeMartel It's not.
struct CharData{
    CharData()
        : x(left), y(top) {}

    CharData(CharData const& other)
        : top(other.top), left(other.left)
        , x(left), y(top)
        , image(other.image) {}

    CharData const& operator=(CharData const& other){
        top = other.top;
        left = other.left;
        image = other.image;
        return *this;
    }

    int top;
    int left;
    int& x;
    int& y;
    std::string image;
};
 
3:49 PM
also, you can try assert(&m_ref == &rhs.m_ref);
 
Xeo
for example, here a reference member is perfectly fine, since it only refers to internal entities
 
sbi
@Fanael The question dumb pointer vs. smart pointer is all about what they refer to. Are they (co-)responsible for its lifetime? => smart pointer! Do they refer something that's always there, or whose lifetime is managed by something else (and a reference won't do)? => dumb pointer.
 
user784668
@sbi Yeah, right, and in the question I linked to, it's the latter. I probably should've written "why people are so afraid of raw pointers even when they're a good tool for the job"?
 
sbi
@Fanael Because they don't know the distinction, or can't tell which one applies.
 
Kev
hey folks...has this individual been a bit of an arse? chat.stackoverflow.com/users/365144/jsoldi
 
sbi
3:53 PM
@Kev You bet. Just look what we moved to the bin
 
Kev
@sbi just today or all the time?
 
sbi
@Kev I hadn't seen him before. @RMartinho? @DeadMG? @Xeo?
 
no, I don't recall him from before today
 
Xeo
I wasn't even here when the incident happened
 
Kev
@sbi yeah that's what brought me here.
 
Xeo
3:55 PM
And I don't remember him being here before
 
the problem was that we couldn't raise enough flags to get him banned from the chat
 
Kev
ok folks, thanks for the info.
 
sbi
@Kev The worst of his messages had been flagged, and he was banned for quite a while.
7 hours ago, by Pubby
> This user has been automatically suspended for posting inappropriate content and cannot chat for 3 hours 58 minutes.
@Xeo Ah, sorry, I wasn't sure who was here.
 
Xeo
@sbi 6 days currently
 
sbi
@Xeo Oh really? Wow.
Well, I guess many others validated the flags that were still pending then. :)
 
3:59 PM
you can request access
 
Xeo
Ah
Yeah, I overlooked that.
 
done
 
Xeo
Thanks
1 message moved to bin
Alright, works as expected
 
What the hell.
This guy needs to go out more.
 
user784668
4:07 PM
What the heck this guy is talking about?
 
Kev
@sbi - won't be a problem now
 
@Fanael He hates comments.
 
sbi
@Kev Whaddaya mean?
 
Kev
@sbi I've extended the suspension. Unless he appears on a new account you won't be seeing that crackpot for a while
 
sbi
@Kev Thanks!
 
4:10 PM
@kev when something begins to whiff, it's a clear sign we are becoming popular :ohyeah: :D
suprisingly, but our chat is growing and growing :) It wasn't that case just a 2 weeks ago. ;)
 
@DzekTrek Wait.
 
user784668
@DzekTrek: You'll be the next one.
 
Shit's getting real.
 
@Kev Who's the lucky one?
 
sbi
@KerrekSB See here
 
Xeo
4:24 PM
> This user has been temporarily suspended by a moderator and cannot chat for 89 days.
Hrhr
Good ol' temporary<->permanent equivalence
 
@sbi Oh dear.
 
sbi
@KerrekSB And the worst is already gone, because it was flagged. (When I came into the room this morning there where about five dozen flags. I validated them all.)
 
@sbi But the user is still able to post on SO, right?
Any C11 buffs here who might weigh in on this question?
 
sbi
@KerrekSB No, apparently not.
 
@sbi Haha, "cooldown" till May. Sweet.
Does any suspension automatically kill all reputation?
 
Xeo
4:29 PM
@KerrekSB No, it just shows as 1
 
user784668
Posted by Jeff Atwood on April 6th, 2009

Are you familiar with the Penalty Box?

The penalty box (sometimes called the sin bin, bad box, or bin) is the area in ice hockey, rugby football and some other sports where a player sits to serve the time of a given penalty, for an offense not severe enough to merit outright expulsion from the contest. Teams are generally not allowed to replace players who have been sent to the penalty box.

It’s not something we looked forward to, but as of tonight, we’re instituting a penalty box on Stack Overflow. …

 
user784668
"At the end of this timed suspension period, your reputation will be recalculated, and your account will resume as normal. We don’t hold grudges. The point of all this is to address the behavior. If the behavior improves, you are welcome back."
 
@Xeo Ohh -- so when the suspension ends, the user will again have all previous privileges?
@Fanael I see. Cool.
 
Xeo
Yes
 
@sbi I guess that means my flag on one of his posts got validated then :)
 
4:32 PM
This question confuses me - read-only or changlable objects? What should it be?
 
user784668
@KerrekSB Read-only, changeable objects.
 
Xeo
@KerrekSB That question is an oxymoron. oO
 
> But the objects should be changle.
What the hell is changle?
 
user784668
ChangLe () is a county-level city of suburban Fuzhou located in east Fujian province, People's Republic of China. Administered by Fuzhou city. Changle occupies a land area of 648 square kilometers and a sea area of 1327 square kilometers. Changle was established in the sixth year of Emperor Wu-De (623 AD) during the Tang Dynasty, and it became a county-level city on February 18, 1994. Changle faces Taiwan across Taiwan Strait and is connected to Mawei Economic and Technological Zone by Min River. The city may change its present status to a district due to a government proposal. Located 3...
 
Well, now you got me.
But I doubt he's talking about a Chinese city.
 
sbi
4:35 PM
@EtiennedeMartel ab
 
Xeo
@KerrekSB After clarification, that question is a duplicate. Lemme find the link...
5
A: Immutable container with mutable content

Oli CharlesworthRather than providing the user with the entire container, could you just provide them non-const iterators to beginning and end? That's the STL way.

The comments discuss the paradoxic nature of that request
If you can change the elements, you can effectively change the list by just reassigning the elements / swapping them / whatever
> Space removal from a String - In Place [Okay, all right... ] C style with Pointers [Whyyyyyy?!]
room topic changed to Lounge<C++>: You don't need complete types for forward declarations: struct Widget foo(struct Gadget); [c++] [c++11] [c++-faq]
 
Als
4:51 PM
what the fuck is that room title!
 
sbi
@Als An abomination, installed by nerds.
 
Als
@sbi :), How have you been? Hows the weekend?
 
sbi
@Als The weekend's lazy. I have been hanging out at home, doing mostly nothing.
I will have to leave the apartment and go into the cold, though, to buy food for the weekend.
How are you, @Als?
 
Als
@sbi I see, My weekend is kind of busy, finishing off impending chores
I think I will have a sound sleep tonite
Is it too cold there?
 
sbi
6 hours ago, by sbi
@DeadMG The heating in this flat has been fighting the cold for >4hrs now and I'm still not comfortable sitting in the living room barefoot in my pajama. Also, for the 3rd time in the 9 years I'm living here, I had to close the larder's window, lest it freezes in there. And I had to actually turn on the heating in my sleeping room in order to keep the temperature above 10°C. (While I like to sleep cold, I don't like my nose freezing at night.) It's -9°C outside — at noon! Bloody cold.
 
Xeo
4:56 PM
@Als -9°C here, and I'm not that far from @sbi
 
Als
@sbi Oh holy cow, that's cold, We here in equatorial region are not prone to such temperatures
 
-5°C here according to my iPhone. It was around -8°C in the morning.
 
sbi
@Xeo I just went looking, my thermometer says -9.6°C outside my bedroom window. +9°C inside.
@Als We've had down below -20°C in Germany in the last few nights. That's very uncommon here, too.
 
Als
@sbi I remember when I was working for a while in France a while ago a local friend of mine told me not so long ago lot of old people died there due to extreme cold or heat.
 
user784668
@Xeo Man, -9°C is hot! It's -12°C here!
 
4:59 PM
Poland is really cold now. The Cat must be freezing.
 
-19°C here =\ And I'm not glad that I won this contest
 
sbi
@Als Hundreds of homeless have died in Eastern Europe this week.
 
Als
@Fanael: +25*C here, That must be a furnace for you :P
 
sbi
@Als That's pretty convenient summer temperature here. Not too hot.
 
user784668
@Als Where?
 
Als
5:01 PM
@Fanael Mumbai, India
 
I live on the 14th floor so I don't need to heat as much.
 
Xeo
@sbi In Berlin, I find everything over 20°C to be too much.. It's basicaly a wall of heat. :/
 
Als
@sbi Yes, its get hotter in summer here though. A friend stays in middle east and it gets 50*C there even in usual days
 
sbi
@Xeo 25 is Ok, though. Nice to sit in the shade of a tree without freezing.
 
The Elfstedentocht (or, in West Frisian, Alvestêdetocht, English translation: "Eleven Cities Tour"), at 200 km, is the world's largest and longest speed skating competition and leisure skating tour, and is held in the province of Friesland, Netherlands only when the ice along the entire course is 15 cm thick. Course description The tour, almost 200 km in length, is conducted on frozen canals, rivers and lakes between the eleven historic Frisian cities: Leeuwarden, Sneek, IJlst, Sloten, Stavoren, Hindeloopen, Workum, Bolsward, Harlingen, Franeker, Dokkum then returning to L...
^ Dutch peoples are getting nervous. This event only takes place about 6 times per century on average because it requires a very cold winter.
Dammit I missed my stats there.
It's 15 times per century. (1/6 years)
 
user784668
5:07 PM
@StackedCrooked 15 times per century. FTFY
 
Ouch, thanks :)
 
sbi
5:18 PM
Which idiot flagged that?
 
user784668
@sbi Which idiot flagged what?
 
@Fanael what did you flagged?
 
sbi
@Fanael Your message, mocking @DzekTrek to be the next, was flagged.
 
user784668
@Abyx Nothing.
 
sbi
For those who do not know: When you flag something, all >10k users across the whole chat will see your flag, and are nagged to respond to it. Flagging is nothing to be done as a prank.
@Abyx He didn't flag, we was flagged:
1 hour ago, by Fanael
@DzekTrek: You'll be the next one.
 
5:29 PM
hi everybody. what's the meaning of OP?
 
One Piece.
 
What is it with the 8 flags all of a sudden?
 
@StackedCrooked and what does it mean in stackoverflow terminology?
 
user784668
@Meysam Overland Park?
 
@Meysam original poster
 
5:30 PM
@StackedCrooked Yeaaaah
I was aware of the prick who came in and crapped all over the Lounge, but it's alright now, he's banned. I wonder why there are still flags about him.
 
sbi
@EtiennedeMartel Someone went and flagged the messages which are left of the idiot who got himself banned today for being an asshole in here.
 
@Abyx thanks. Are there "Fake Posters" out there too?
 
Oh, I'm not even sure "asshole" is enough.
 
sbi
@Meysam It refers to the one who asked the question.
 
Do you think it'd be evil of me to do something like this in my library?
namespace mylib {
T& operator<<(char const * s, T&);
}
 
sbi
5:33 PM
@EtiennedeMartel Yep, if you look at the bin, you'll see that his messages are flagged.
 
@Meysam what? also, is it a C++ question? use google for such stuff
 
Anyway, he's now banned for, what, 3 months?
 
sbi
@Abyx Why shouldn't he ask here? Don't be rude.
@EtiennedeMartel Yep.
 
@Abyx You must be new around here.
 
@Abyx I am sorry
 
sbi
5:34 PM
@wilhelmtell Probably.
 
OP stands for object programming. @Meysam
 
@sbi why?
 
user784668
@Meysam No need to be sorry, if you want to ask a question, go ahead.
 
@DzekTrek Also, overpowered.
Damn OP mules.
 
sbi
> Whenever the meaning of an operator is not obviously clear and undisputed, it should not be overloaded. — Basic Rule of Operator Overloading #1
@wilhelmtell That's why.
 
5:35 PM
@sbi It's mylib::T, I should emphasize
 
user784668
@wilhelmtell What would that operator do?
 
Is there anything we can help you about it, @Meysam?
 
sbi
@wilhelmtell Show code that would use this.
 
@wilhelmtell it all depends on how would you like to implement it
 
@wilhelmtell you'll bring it to current namespace, in order to use it
 
5:36 PM
from this point, it looks just neat and fine.
 
@DzekTrek No thanks. I am just passing by :)
 
sbi
@Meysam According to me, you did nothing wrong. Welcome to this room. (You might want to read the newbie hints, linked from the right-hand panel.)
 
oper
    (obj0 << 0)
    (obj2 << mylib::ex)
    ("string" << mylib::ex);
 
sbi
@Abyx No, no need to do that. ADL takes care of it.
 
@Meysam ok :) If you need anything, feel free to ask. ;)
 
5:37 PM
@sbi Thanks, I will take a look around :)
 
what exactly does pop and push mean in C?
 
sorry my bad, updated
 
user784668
Supposing that we live in an alternate (better?) world in which iostreams never existed, what would be likely to be the syntax for printing stuff to a standard stream?
 
it's ok to implement it that way
however I don't know what type of object and how would you like to use it, i.e. defined constructor is ok, however for body you need to have some considerations
@wilhelmtell
 
sbi
@Fanael Basically, streams are a good idea, and I'm fine with their syntax. Read this, though.
> You have fully used your vote allowance for today — Wow, even that is limited. Jeff is a true paranoid. (And to think I spent it all on one guy...)
 
5:40 PM
for example friend ostrem& operator<<( ostream& output, const Object& o);
 
@sbi whole sweet biscuits of batman that post is serious rep whorring! :p
 
would be more appropriate for your solution
 
sbi
@wilhelmtell What are you referring to?
 
@sbi this
:p
 
sbi
5:42 PM
@wilhelmtell You mean you hadn't seen the Operator Overloading FAQ?
How dare you ask a question about operator overloading without having read the FAQ?! :)
 
user784668
@sbi I never liked the idea of shifting a stream by a double.
 
One of my favourite songs :( made me cry
 
srsly though, would it be evil?
 
sbi
@Fanael You learned C first?
 
considering the example i showed, where i'd like to use it.
 
sbi
5:43 PM
@wilhelmtell I haven't seen an example. Have I missed it?
 
the alternative being to explicitly instantiate an object with the string ... :-S
 
user784668
@sbi No.
 
sbi
@wilhelmtell That doesn't tell me anything, because I don't know what those variables are.
@Fanael If you learned C++ first, you must have started with std::cout << "Hello, world!". From that moment, << is the output operator, no?
Or something must have gone wrong seriously in your C++ education. :)
 
mylib::statement insert(...);
transact
    (insert << 0)
    (insert << 3.14)
    ("select ... from ... " << 1);
transact.commit();
fuck it it's not gonna work
 
sbi
@wilhelmtell Mhmm. I don't think this can ever compile.
 
5:46 PM
'cause i'll have to allow for two primitive types which is illegal
yeah
 
user784668
@sbi Yeah. And some time later, we all learn that it's actually a bitshift, reused to mean "write to stream" by the machinery in iostreams' headers.
 
sbi
@wilhelmtell Is transact a function object?
 
yeah
but even that, now that i look at it from this room's perspective, doesn't look write
 
sbi
^right
 
because transaction's operator()() is used to build up tre transaction. not really a function, semantically speaking.
 
sbi
5:48 PM
What is transact(insert << 0)(insert << 3.14)("select ... from ... " << 1); supposed to mean?
 
i chose operator()() even though operator<<() would make more sense because i already have operator<<() for statement.
 
sbi
What is transact(insert << 0)(insert << 3.14)("select ... from ... " << 1); supposed to mean?
 
build up the transaction one statement at a time. if any statement fails they all do.
 
sbi
"build up the transaction"?
Oh, I see. You are storing statements to be executed later in one go?
 
well the insert was constructed beforehand, but never delivered to the database. the transaction takes the insert statement, binds it a couple of times, then sends them all to the database together, as a transaction, s.t. all must succeed.
yes.
atomically.
 
user784668
5:50 PM
@wilhelmtell transaction.add_statement(something); transaction.add_statement(something_else); transaction.run(); Oh yeah, much clearer.
 
@Fanael i don't think so
way too verbose to my taste. i want it to feel like a dsl, not java.
 
user784668
@wilhelmtell Do not say the J-word!
 
sbi
> Instead, provide a function with a well-chosen name.
 
What's GoingNative?
 
sbi
@wilhelmtell Code is rarely ever too verbose. Often it's too much tweaked, though.
 
5:52 PM
@sbi please don't push me that way. i don't want to go there!
 
sbi
@SethCarnegie It was a 2-day MS conference sporting many C++ gurus plus some other interesting people.
 
Ah that's cool
 
maybe that can work ...
mylib::statement insert(...);
transact
    << insert << 0
    << insert << 3.14
    select << 24;
transact.commit();
oh man what am doing to myself. why am i complicating things.
 
sbi
@wilhelmtell Well, you came here and asked whether the code is Ok. If you don't want to hear a "no", you shouldn't ask in the first place.
 
:-S
 
sbi
5:54 PM
@wilhelmtell I doubt it will be easy to tell where a statement ends and the next begins.
 
yeah
 
sbi
transaction.add(statement1);
transaction.add(statement2);
transaction.add(statement3);
transaction.run();
 
transact.add(insert << 0);
transact.add(insert << 3.14);
transact.add(select << 24);
transact.commit();
mm ...
so many transact ...
:-(
 
sbi
Haha, I was half a second ahead of you.
 
lol
 
sbi
5:55 PM
@wilhelmtell transaction.add(statement1).add(statement2).add(statement3);
 
user784668
@wilhelmtell Name it _ and your problem is solved.
 
what's the usage of a pointer to array, like:
int (*a)[10];
 
what do you think of statement& operator<<(statement, T const&) ?
 
sbi
transaction.add(statement1)
           .add(statement2)
           .add(statement3);
 
-> would look cooler
 
user784668
5:57 PM
@sbi It's simpler than that: transaction.rollback(); throw database_error("wtf omg");
 
@Meysam there some cases when you use reference to array, and when you can't use reference-to-array, you use pointer-to-array. For example as function return value.
 
sbi
@Meysam In almost twenty years of C++, I don't think I've ever needed that.
 
template<typename In>
transaction::add(In first, In last);
 
@sbi no, probably you need it if you use STL =)
 
user784668
@Abyx std::array.
 
5:59 PM
@Abyx ouch
 
sbi
@Abyx I've never used Stephan.
 
@Fanael ok, not STL but C++ standard library
 

« first day (476 days earlier)      last day (4478 days later) »