« first day (1326 days earlier)      last day (3636 days later) » 

2:00 AM
a const reference to the container will have begin(cont) return a const_iterator
 
@Rapptz do you build boost yourself?
 
yes
 
this is on windows with gcc 4.9?
 
yup
 
it takes sooo long =/
what do you use to build 32-bit static release libraries?
 
2:03 AM
it builds it 4 times by default
static, dynamic, release and debug
 
I only build release
only static
 
@nightcracker whatcha mean
 
I tried this:
b2 toolset=gcc variant=release link=static runtime-link=static --build-dir=build_dir_gcc32 address-model=32
but it crashed =/
(after building, then linking with a program)
 
user3010322
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGH this BLOWS
 
user3010322
Whhhhhhhhhhhhhhhyy meeeeeee.
 
2:09 AM
then I tried b2 toolset=gcc variant=release link=static runtime-link=static --build-dir=build_dir_gcc32 address-model=32 architecture=x86 cflags=-m32 cxxflags=-m32 but now I get duplicate section blablabla has different size
 
user3010322
Why did they disallow an array of references WHY
 
user3010322
WHY make such a RETARDED decision
 
user3010322
now *begin( arr ) == std::reference_wrapper<char>
 
user3010322
Which is completely fucking unsable
 
user3010322
Whatever. Everyone can suffer the copies.
 
2:11 AM
11
A: Why can't we create array of references?

James KanzeBecause indexation into an array is actually defined in terms of an implicit conversion to a pointer, then pointer arithmetic. So to support this, you'd have to also support pointers to references, and define what pointer arithmetic means on them.

20
Q: Why arrays of references are illegal?

Alexey MalistovThe following code does not compile. int a=1,b=2,c=3; typedef const int & intlink; intlink arr[] = {a,b,c,8}; What C++ standard says about it? Is this compiler error? P.S. I know I could declare class that contains reference and use it in array, but I really want to know why the code above does...

 
1
Q: Leave your feedback about the Help Center and your closed or downvoted question here

Robert HarveyThis question is for new users who have asked questions that have been closed, downvoted or put on hold by the Stack Overflow community. We would like to use your feedback to improve the Help Center, and hopefully help new users ask their questions without getting them put on hold or downvoted...

 
user3010322
Blah blah blah, crappy reasonings.
 
Of course.
 
user3010322
References should have just had an implementation-defined sized.
 
user3010322
Problem fucking solved.
 
2:13 AM
@nightcracker I don't really recall.
 
@Rapptz do you have mingw 4.9 static static-stdlib 32 bit release boost libs? if yes, would you mind uploading them somewhere so I can test whether those work for me?
 
I only use 64 bit libraries
 
you never have to build 32-bit releases?
 
nope
My compiler is 64-bit, my OS is 64-bit etc
 
> my ... my ...
I see you never have to build releases at all :P
 
user3010322
2:20 AM
 
user3010322
It's building
 
user3010322
and working.
 
user3010322
... At least, for one source file.
 
user3010322
I have millions of warnings
 
@nightcracker I asked around 2 years ago.
 
user3010322
2:21 AM
And then I have to go through all the rest of hte source files
 
user3010322
But it should be working, soon enough.
 
No one really uses 32-bit on Windows 7 or higher.
I can share my executables just fine.
 
user3010322
Now I need to build my custom build system.
 
windows xp and vista still account for like 20-30% of the windows population
 
user3010322
... The important part is, however.
 
user3010322
2:23 AM
I'm free.
 
user3010322
I'm free of VC++. Forever.
 
@ThePhD Never say forever :P
 
user3010322
@Borgleader I refuse to go back.
 
user3010322
Nobody can make me.
 
user3010322
2:24 AM
I'll never go back.
 
user3010322
I will die before I go back to VC++.
 
@ThePhD You could use Shogun and tell me what to fix with it :v
 
user3010322
Shogun isn't ready for my use. :v
 
what's shogun
 
Generates files just fine.
 
user3010322
2:25 AM
Can I have projects depend on other projects?
 
user3010322
And instantly cart outputs from one project to the next, when the build is finished (set up a chain of builds?)
 
2 mins ago, by nightcracker
what's shogun
 
user3010322
Not convenient enough.
 
ninja file generator :v
 
user3010322
2:29 AM
I'll just end up making my own build system with lua as the backbone or something.
 
gl hf
 
lol?
nvm
 
?
 
did something like
b2 .... -j=3
got: Invalid value for parameter j, needs to be between 1 and 64
looked funny, turned out I need -j 3
makes me wonder why b2 doesn't default to NUM_CORES - 1 for parallelism in the first place
@Rapptz I figured out my issue
 
I remember being able to #include a text file as a string literal..
time to find out again how to do it
 
2:36 AM
@Rapptz I had built boost with runtime-link=static
but I forgot to use -static-libgcc -static-libstdc++ when testing
 
Dec 15 '13 at 1:50, by Rapptz
#include <iostream>

int main() {
    const char x[] =
    #include "data.txt"
    ;
}
oh yeah.
 
that doesn't work anymore?
nvm
didn't read "time to find out again how to do it"
thought you were being nostalgic to "deprecated features" or something :P
 
nope
funny enough, I don't have to include anything!
I can just boost::filesystem::copy instead.
I was being dumb
 
yess!
I managed to compile a fully static 32 bit as well as 64 bit boost for mingw(64) with gcc 4.9
 
shame I can't do R"( #include "stuff" )"
 
user3010322
3:01 AM
@Rapptz I said the same thing a while back.
 
user3010322
When I was including shaders.
 
user3010322
But, alas.
 
user3010322
I had to solve the problem by just putting the Raw String Literal inside of the "stuff" file.
 
user3010322
Of course, that makes the stuff file unsuitable for... well, everything.
 
3:28 AM
nope
 
I think everyone here repwhored for a while
this is like the sinkhole for burned-out SO'ers
 
3:53 AM
You have a better chance at getting banned if you ask dumb trolling questions like "how much will it cost me to hire a Stackoverflow moderator/stuff for a night"
 
hi
hi scott
How are you doing today?
Good, thank you
 
hey alias
 
Hi chmod
what does the dotted line mean?
 
yeah right, internet making out is so awesome </sarcasm>
~_~
 
what does the dotted line mean?
>:(
hi
the line that randomly appears after what I just said
no, it just appeared between you last message and my second last message
 
4:02 AM
new messages since you've tabbed
 
what does im tabbed mean?
i mean ive tabed mean?
 
away from the tab
 
what tab?
 
@Bobthezealot the messages below the dotted line are new ones since you switched over to a different tab or window (from your browser)
 
Your browser tab dude
 
4:04 AM
oh ok i get it thanks
do you see it?
 
****** - we all do
 
It's client sided.
 
ok, but sorry, i have to swich
lol
 
LOL I love this hydraulic engineer's reply:
There shouldn't be any modifications needed. If there are small variations requested then I can accomodate, but sometimes council's ask for ridiculous things for no reason which cost additional time and fees.
The items that I agree to do are written on the scope of works. Additional items do require additional fees, but it should be straight forward without any changes unless council starts being stupid.
 
bye, gota go!
 
4:13 AM
@ScottW I don't make any particular point of it one way or the other, but I'd guess I still write an answer at least most weeks.
 
4:26 AM
I suppose I should add, however, that I anymore I probably vote to close 5 questions for every one I bother answering (and most I do answer should probably be closed as dupes too, but sometimes it's easier to answer than find the correct dupe).
 
user3010322
Answering questions is tough. :<
 
I do mostly clean up now a days
 
user3010322
I forgot how to capture the current context in a lambda.
 
[&stuff]
 
@ThePhD you mean like [&] ?
 
user3010322
4:30 AM
Ooh.
 
user3010322
I was writing [ this ] (...) -> ... { ... }
 
@ThePhD I believe you're one ellipsis short of DWIM there... :-)
 
5:18 AM
Swift > C++
 
5:31 AM
D > C++ (lexicographically)
 
@user782220 It has a fair number of good ideas, but a few massive blunders (e.g., ARC) that turn it into a net loss.
 
Newbie here, is it a bad programming strategy to use cin inside a member function of a class??
 
@sameer Yes, if you're using namespace std; somewhere. Otherwise, no, except if you want to accommodate different streams, which you ought to be more generic.
 
@sameer Not necessarily bad, but not necessarily the right way to do things either.
 
It's a cin.
 
5:38 AM
@StackedCrooked lol. Though depends on pronunciation.
 
Okay need to know why ? it is bad
and yes I am using namespace std;
 
Generally I would use istream& so it is compatible with different kinds of input.
However, if std::cin is exactly what you need then you can use std::cin of course.
 
@sameer It's not necessarily bad, but only makes sense when/if you want to force reading from standard input rather than allowing input from whatever stream somebody might specify. In something like a game that expects interactive input, it can make sense. Most programs should allow reading from other streams as easily as from cin though.
 
@JerryCoffin I was confused when you referred to cin as "interactive". Ah well. :)
 
6:13 AM
I should write childrens books
5
A: Is it poor style to use *this to initialise a class?

Filip Roséen - refp Imagine that someone asked you to draw a painting... would you; first draw your default (1st) (that familiar smilie face you like so much), then draw what that someone asked for (2nd), only to draw the same thing one more time, but on the canvas containing your default, and then ...

 
Wow.
How is that question not instantly closed?
 
It's a bit intriguing.
 
@Rapptz because SO isn't what it was a few years ago.
 
That question would be allowed in SO in 2008 but not now.
 
Now that people in SO really don't know what to do anymore.
 
6:21 AM
It's not a bad question.
 
It's offtopic.
 
@Rapptz we have both seen far worse, it's decent
 
I didn't say it's a bad question.
I said it's offtopic.
 
@Rapptz for what reason?
 
People typically close questions incredibly fast.
@FilipRoséen-refp "is it good style" questions don't belong here
 
6:23 AM
being "opinion based" is the closest close-reason, but since the side-effects of using the proposed construct is clear enough to have that as a non-subjective answer
 
@user3013172 I never disputed that it was /a/ polygon. I just said that we would like to see the polygon. I'm voting to close because there isn't enough information to reproduce the issue. — sehe 1 min ago
 
@Rapptz not relevant. the [coding-style] tag is about the stylistic's of written code, not the semantics
 
lol not relevant
I just used that tag because it showcases how many "is it good style" questions have gotten closed.
 
It's more than just a style question.
 
6:26 AM
@Rapptz of course it is, see the tag wiki (I removed the tag from the question btw)
 
Ryde council: you are piece of shit! Next time reminds me not buy into a shitty area! Money starving council with shitty policies that stops people from building any new dwellings! So the development site opposite the road by-passed ryde council and applied to the states & got approval instead
 
@MarkGarcia If you go to some of them you'll see close/delete/reopen/undelete wars: stackoverflow.com/posts/36707/revisions
 
@Rapptz I think it's only poorly titled
 
@sehe agreed.
 
6:29 AM
@Rapptz if you look hard enough you always find evidence to support any statement
 
Sydney is seriously in need of more dwellings because, doh rental market is tight. But local government is putting red tapes every where to prevent people from building.
 
I agree that the title (should) trigger the knee-jerk reaction here
 
k well
I changed the title.
 
@Rapptz I like how you put "negative" at the body, while omitting it at the title.
 
Made the title too long
negative consequences sounds silly anyway, not sure why I put it :/
 
6:37 AM
Titles shouldn't sound pessimistic (in the lines of "Is this bad code?"). Sets off the close knee-jerk reaction.
 
6:57 AM
469
Q: Why is "using namespace std;" considered bad practice?

akbiggsI've been told by others on numerous occasions that my teacher was wrong in saying that we should use using namespace std; in our programs. Hence, we should use std::cout and std::cin and these are more proper. However, they did not even make it clear ever why this is a bad practice. Why is usin...

@Borgleader It is up now!
 
FINALLY :)
 
lol I can choose between 150 MB, 1.6GB and 2.6GB
That's a pretty wide gap between low and mid quality.
 
Low is probably for phones
Hi
 
Yes. I went with mid.
 
Today is the last Germany step of my trip.
Can't wait.
 
7:08 AM
how long are you biking for again?
 
Today is day 6.
Still dunno if I'll decide to bike on day 7 or spend it resting.
 
user1804599
Is this a good book? amazon.com/…
 
user1804599
A colleague bought it.
 
Can't do more than seven because I need to be back for the unconference and to welcome a new flatmate.
 
7:22 AM
I just dupe-hammered an SSE question by abusing my C++ gold badge. aha
 
Let's see what passes for breakfast in this place.
Later.
 
stupid regulations - because people who set those regulations are stupid
There should be IQ check for people who hold power to do anything to make people's lives worse
 
in case anyone is interested
I automated my build setup for mingw 4.9 on windows for boost
and created a git repo/uploaded the binaries as a release
 
Xeo
7:37 AM
Mornin
 
@nightcracker nice, will try it; what version of GDB does it have?
 
@legends2k what do you mean with "what version of gdb"?
 
7.6
or 7.7 or ...
 
@legends2k maybe there is a misunderstanding one way or another, you do realize these are just standalone boost libraries, right?
@legends2k this is not a mingw distribution
 
oh I was mislead by the leading mingw 4.9
nevermind
 
7:44 AM
@legends2k if you're looking for an up-to-date proper GCC installation for windows, this is what you want, almost undoubtly: sourceforge.net/projects/mingw-w64/files/…
@legends2k it's 64 bits gcc 4.9, but it can create both 64 bit and 32 bit binaries
@legends2k and it ships with gdb 7.7, since you were interested in that
 
gdb is lame without -tui
 
C:\Program Files\mingw64\bin\gdborig.exe: TUI mode is not supported
 
Yeah. It's cause Windows sucks.
 
user1804599
@Rapptz TIL.
 
@nightcracker Thanks, I'm using MinGW 4.8.1 from sourceforge.net/projects/mingwbuilds/ where 4.9 isn't out yet; will try this one now
 
7:48 AM
@legends2k mingw-builds merged into what I linked you, mingw-w64
just so you know, there's multiple versions of mingw-w64
exception handling can be DWARF, SJLJ or SEH, DWARF is terrible on windows (basically you only want this if you need it, e.g. Rust), SEH is best but can only generate 64 bit binaries thanks to a patent, so you usually want SJLJ to build releases
then you can choose between windows threads or pthreads (you want windows threads)
what I linked to you is SJLJ with win threads
 
mingw-builds seemed stale for sometime now... now I know why
 
oh
and of course the compiler itself can be 32 bit or 64 bit
I assume you have a 64 bit machine, so I linked you the 64 bit version
(but the 64 bit SJLJ compiler can still generate 32 bit executables with -m32)
 
I need a newer GDB since without which I was pass -gdwarf-3 to GCC so that the debugger work
yes yes, I've a 64-bit machine and a 64-bit OS on it
 
BTW
I checked Steam's Hardware survey
and most people run 64-bit windows: store.steampowered.com/hwsurvey
by a rather large margin
 
user1804599
most people run for their lives.
 
7:57 AM
@Rapptz I found a gdb with tui for windows
@Rapptz seems to only work with 32 bit executables though
also it's quirky =/
 
that'd be pretty cool
if I didn't switch to vim =/
 
It is pretty cool.
 
ctrl + shift + p -> inst -> sublgdb
 

« first day (1326 days earlier)      last day (3636 days later) »