« first day (790 days earlier)      last day (4173 days later) » 

9:00 PM
@JerryCoffin Right. But per example, restricted firearms require a license. Carry regulations are also very different some the US. Open carry is rarely permitted and concealed carry is almost impossible. This is not the case of a variety of states in the US.
 
@melak47 if you want include <boost/whatever> to work on every project, you have to either (A) add the boost directory manually to every solution that will use it, or (B) close visual studio, go find and edit that hidden/unmentioned file, then restart visual studio.
 
45
Q: Uncatchable ChuckNorrisException

Max CharasIs it possible to construct a snippet of code in java that would make a hypothetical java.lang.ChuckNorrisException uncatchable? Thoughts that came to mind are utilizing for example interceptors or aspect oriented programming.

^^ dafuq?
 
@MooingDuck huh? that text says you can make changes to that file directly
 
@melak47 yes. I've been trying to do this for quite a while and most people said "it can't be done." How was I to know to go edit that particular file
@melak47 also, I still can't find the file
 
9:03 PM
@R.MartinhoFernandes Ye.
 
@MooingDuck hm. I know I've done this before. but if there is an easier way, do that
 
@MooingDuck You can set environment variable options to gcc to find it.
 
And it's actually a legitimate question too. Well played by the OP.
 
@netcoder There are a certainly some states that allow concealed carry (with a permit). Open carry is so rare that I have a hard time imagining it making much difference to anything (in my entire life I've only seen one person openly carrying a handgun, other than on-duty policeman and such).
 
@melak47 there was. But they removed it from MSVC 10.
@JohanLundberg cat just told me that, I'm testing it now
 
9:04 PM
@MooingDuck no I mean via the environment variable thing
 
Oh look Chuck Norris jokes
It's like 5 years ago again
 
@JerryCoffin In Canada, it's technically legal to carry a concealed weapon (with a permit), although there is no permits issued for it. Open carry is not that rare though: I've seen security guards carrying semi auto shotguns emptying ATMs a few times. I was under the impression, however, that the US didn't necessarily require you to get a permit to obtain a restricted firearm like a handgun, which is the case in Canada.
 
If I want to learn about Tree implementations, I suppose I should read Cormen/Rivest? Or are there other suggestions?
 
Get drunk
 
@MooingDuck ( stackoverflow.com/questions/558803/… ) .. sure you know this...
 
9:08 PM
@CatPlusPlus Yessssssss.
 
That's Windows and MSVC not Linux and GCC
As in, what moping duck has
 
Getting drunk sounds like a reasonable suggestion, yes.
 
@R.MartinhoFernandes is FTL good?
 
Better than reading about trees
 
user1182183
well like always boost is not wanting to cooperate -.-'
 
9:10 PM
Speaking of getting drunk, I'm out.
Y'all have a good weekend.
 
user1182183
*idea->copy_paste_from_existing_project
 
user142019
Setting up boost is a piece of cake.
 
user142019
Like, -lboost_system -lboost_filesystem.
 
user142019
And then #include <boost/filesystem.hpp>.
 
user1182183
@Zoidberg'-- for you, not me :F
 
user142019
9:13 PM
I made a terrible wallpaper. i.imgur.com/VNCk1.jpg
 
Terrible might be giving you too much credit.
 
@CatPlusPlus sure that works? That doesn't seem to have added it to my "build system path".
 
user142019
imgur y u convert TIFF to JPEG
 
It doesn't add anything to project settings
The compiler just considers it when building
 
@Zoidberg'-- Because it's proprietary isn't it?
 
9:14 PM
They're implicit like stdlib include path
 
user142019
@Rapptz today I learned.
 
Nope never mind, it isn't patented.
 
@CatPlusPlus Eclipse uses the compiler to parse headers.. So surely it must respect the variables from the environment? (eg linux shell).
 
Nobody is talking about Linux, Eclipse or parsing anything to anything jesus
 
Eclipse is also a piece of shit
 
user142019
9:16 PM
Eclipse is terrible
 
We're talking about MSVC
 
user142019
I don’t understand why people would ever want to use it.
 
@CatPlusPlus haha, I got you.
then have fun
 
Great
 
@netcoder That does (I think) vary by state. There are, I'm pretty sure, some that will let you own a handgun without a permit, as long as you never carry it. It is certainly possible to get a concealed carry permit, but (at least in the states of which I'm aware) pretty tightly controlled -- probably not as difficult as in Canada, but not exactly trivial either.
 
9:16 PM
my computer is dying because it's out of memory :(
Visual Studio + Netbeans + Chrome = as much memory as I have
 
@Zoidberg'-- What's your setup then?
 
Consider upgrading
 
user142019
@JohanLundberg Sublime Text 2 and Terminal.
 
user142019
For C++, C and Objective-C I also have SublimeClang.
 
user142019
For version control I use Git.
 
user142019
9:19 PM
And that’s about my setup.
 
user142019
C, C++ and Objective-C compiler is clang, Haskell compiler is GHC (I use it through Cabal 99% of the time), Erlang compiler is the official implementation.
 
Erlang.. Are you Swedish?
 
user142019
No. If you use C++ you’re not automatically Danish either.
 
haha. well ok. I'm Swedish but no Erlang for me ;)
 
user142019
I’m Dutch.
 
9:22 PM
close enought
 
user142019
If you ain’t Dutch, you ain’t much.
 
@MooingDuck Memory has become dirt cheap. How much you got?
 
@FredOverflow inb4 win32
 
I'm gonna have 16GB haw
 
16 GB on win32?
 
9:28 PM
No, who uses 32-bit OSes anymore
 
@CatPlusPlus I already got 16 GB.
 
user1182183
finally! it compiled ;F
 
user1182183
BOOST_ALL_NO_LIB
BOOST_ASIO_DISABLE_IOCP
 
For projects with say >100 files in rapid development I find it starts to become useful with an IDE. Just for easier renaming and moving of variables. + I like to have a colorful debugger... So eclipse is what I get.. But it really really does not like to parse the 10000 headers from boost, takes a long time and it's unstable...
 
user1182183
have to love these
 
9:28 PM
I have 32GB. :)
 
@JohanLundberg Eclipse is nice.
 
Eclipse is always unstable
 
@FredOverflow Except when it hangs, and it's slow...
 
I'm the only one who likes Code::Blocks
 
Which is 99% of time
Yes
 
9:30 PM
@Rapptz Code::Bollocks
 
Never have a problem with Eclipse.
 
@netcoder What languages do you use Eclipse for?
 
user142019
@FredOverflow JAVA and Php
 
Oh sorry, it's not 10000 headers in boost. it's 8692
 
user142019
@ThePhP
 
9:31 PM
@Zoidberg'-- The combination Eclipse+Java has never caused problems for me.
 
user142019
I have a Ph.P. in computer science.
 
Everything. C, C++, Java, Python, PHP (I know)
 
@Zoidberg'-- man. And you keep saying my jokes are weird/cryptic
 
user142019
@FredOverflow except Java.
 
@Zoidberg'-- right :)
 
9:32 PM
You have Ph.P. in brain surgery
 
I have SVN, GIT, ADT, and a shitload of other plugins too
 
@FredOverflow 3GB, WinXP32bit
 
user142019
The only IDEs I have installed are Xcode because that shit is needed on OS X, and NetBeans because of historical reasons.
 
The SSD makes a huuuuuuuuge difference with Eclipse,s performance.
 
@MooingDuck Windows 7 is only like $30 on eBay. Do yourself a favor and upgrade.
 
user142019
9:33 PM
And I have two operating systems installed; OS X and Emacs.
 
@FredOverflow work machine
 
user1182183
boost::filesystem::current_path(); returns the path of the executable where my DLL is loaded or the path of the DLL?
 
@MooingDuck Quit your job ;)
 
At work I have a nice 16 GB 8 core box with SSD, and it still takes me minutes to reindex our project in eclipse
Then I tried visual studio.. And that was a lot... worse
 
@GamErix niether, it returns the "current directory" (the folder it uses when you do IO without a full path)
 
user142019
9:35 PM
Try Sublime Text 2 and a terminal. It’s much better.
 
user142019
Or Vim or Emacs or whatever.
 
user1182183
@MooingDuck you mean the working directory?
 
user142019
IDEs IME are nothing but pain and sorrow.
 
@Zoidberg'-- That would be emacs and zsh. that's my life up to here ...
 
@GamErix yes
 
user142019
9:36 PM
OMG Z Shell <3
 
user1182183
@MooingDuck ok :P
 
@MooingDuck Really? My condolences.
 
wait, I thought it was common for whatever::iterator to inherit from whatever::const_iterator, but it dawns on me that swap could then be used to change a const_iterator into an iterator.
 
@Zoidberg'-- So (how) do you debug?
 
user142019
@JohanLundberg LLDB, valgrind, printf/cout/NSLog
 
9:40 PM
-1
Q: Behavior of unsigned array index 0xffffffff with GCC

skjaidevHere's something I observed recently. GCC treats an unsigned 32 bit array index of 0xffffffff as -1. See this sample piece of code: 1 #include <stdio.h> 2 3 int main (void) 4 { 5 int test = 123; 6 int array[1000] = { 0 }; 7 int test2 = 345;...

Think it's justified to close a question trying to make sense of UB as not constructive?
 
I don't usually like 4chan
but I had to
 
@Praetorian stared?
 
And upvoted too!
 
user1182183
hm is there a way to "safely" (without crash) make vector.push_back(MyStruct()); fail?
 
user1182183
(using the constructor?)
 
9:42 PM
@Zoidberg'--: One day, you will have a manager breathing down your neck, with deadlines and code guidelines and you'll use an IDE proper and stop bitching and whatever about coding in a terminal bullshit. :P
 
@GamErix Why would you want to?
 
@Praetorian no, he doesn't acknowledge it as UB, so it's a constructive question. (Answer, unsigned -> signed conversion when the value doesn't fit in signed is UB)
 
user142019
@GamErix throw from the ctor.
 
@GamErix you can forbid copy and move
 
user1182183
@Borgleader so I don't have to exit the probgram just because a optional file doesn't exist...
 
9:42 PM
@Borgleader It's really unlucky.
 
user142019
@netcoder if a manager thinks he can decide what editor I use, he’s got the wrong employee.
 
@GamErix Check if the file exist first and do it only if it does?
@EtiennedeMartel "Fox News Experts..." Since when does Fox News have experts on anything?
 
@Praetorian related: I think the top answer is wrong.
 
@MooingDuck I don't think there's any type conversion at all. What he's seeing is just unsigned int rollover, he doesn't understand it. Look at Stephen Canon's comment
 
user1182183
9:44 PM
@Borgleader or should I just make a temporary variable Struct temp(vars); and check a bool if there were any errorst at construct?
 
user1182183
then push back if not?
 
@GamErix Throw an exception or use if/else when the file is not there. Then catch that just outside of that push_back...
 
@Borgleader: They have experts on BS.
 
@Borgleader They probably accidentally the words "self titled".
 
@Praetorian I checked the spec, you're right, there's no conversion here.
 
9:46 PM
@GamErix I would just check that the file exists first. And then push back the struct if it does.
 
@MooingDuck Where is it? I tried to look it up but couldn't find anything
 
@Praetorian 5.2.1
 
Thanks
 
user142019
@Borgleader race condition. File can be deleted between check and push_back.
 
@EtiennedeMartel Fox News... what a surprise...
 
user1182183
9:47 PM
yeah that is a solution to one of the problems, other problems are: file can fail to load, file can run and then crash the VM, then it needs to be unloaded too, etc :F ah I'll just doo
Struct temp(vars);
if(temp->Initialized == false)temp->~temp();
 
@Zoidberg'--: Right, but you will realize how using an IDE would make you more productive and eventually the company's hero, and you'll go for it. Been there, done that. ;)
 
@Praetorian Actually, I assumed pointers were unsigned. If they're unsigned, there's no conversion. If they're signed, I think there is a conversion. And I think (for MSVC at least) they are signed.
 
user142019
@netcoder I don’t see why an IDE would be any more productive than a decent editor and a terminal.
 
@Zoidberg'-- I'm assuming that case is statistically unlikely.
 
9:48 PM
@Zoidberg'-- debugger
 
@EtiennedeMartel Oh god... why T_T
 
@Zoidberg'-- and code completion/suggestion
 
user142019
@MooingDuck I have that in my terminal.
 
I don't get it
 
@Zoidberg'-- IDE usually makes it easier
 
user142019
9:48 PM
@MooingDuck decent editor i.e. an editor has that.
 
@EtiennedeMartel: hahaha
 
Ell
@Zoidberg'-- the build system?
 
user142019
@Ell terminal; no problem.
 
@CatPlusPlus bacon
 
Ell
@Zoidberg'-- or alternatively, IDE, no problem.
if you are more comfortable with a gui, then it will be more productive
 
user142019
9:49 PM
@Ell I’m not. :^)
 
Ell
@Zoidberg'-- well it's a matter of preference :P (which is probably why you don't see it)
 
@Rapptz Still don't get it ... a burger with a bacon label on it?
 
french pronounciation.. or spelling. Whatever you wanna call it
 
In Eclipse, Ctrl-Click, Ctrl-Shift-R/T. If you combine all the time I saved looking for classes, files or types, it's probably a lot.
 
@Rapptz That's the weird thing: around here, we generally say "bacon" with an English pronounciation.
 
9:50 PM
@Praetorian bacon in french is still bacon, on that label it's written as how the guy pronounces it
 
So it's not an exact transliteration.
Or whatever the appropriate term for that is.
 
Unlike French people, we actually pronounce english word with an english accent, not a french one.
 
@netcoder You are Canadian?
 
@CaptainGiraffe Check his profile
 
Are old people bilingual in French speaking Canada?
 
9:53 PM
So apparently, there are 4 regular users here from Montreal... I didn't expect the interwebs to be so small.
 
@StackedCrooked Depends where.
@Borgleader Nerd baller capital.
 
:getout:
 
@CatPlusPlus You're so insensitive.
 
dafuq is C++/CLI?
 
@netcoder A set of non standard extensions for C++ to interface with CLI languages.
 
9:57 PM
Microsoft or something?
 
@netcoder MS C++ for .NET
 
Ah. Explains why I no jackshit about it.
 
Why the fuck is it called CLI
CLI has stood for Command Line Interface, where did Common Language Infrastructure come from
 
@Rapptz "common language infastructure" (I dunno why though)
 
9:58 PM
Common language
 
In my experience, Firefox does an excellent job of crashing when it does prettymuch anything or nothing at all. "Well, that was embarrassing...Firefox crashed because you looked at it funny/belched/it's Friday/<insert seemingly irrelevant excuse here>." — Jack Maney 2 hours ago
 
@Rapptz Because it's an infrastructure about a common language.
 
@Rapptz that's the API for .Net
 
I know what it is.
I am just commenting at the stupidity of the name
 
Your face looks like a face and nobody whines about that.
 
10:00 PM
Well of course it looks like a face.
What is it with people hurting kids today? :(
 
@Rapptz: end of the world theory may be something to consider here :(
Crazy bastard motherfuckers.
 
@Rapptz And to rub salt to the wounds I bet most of those kids were only children...
 
@EtiennedeMartel I like it.
 
@R.MartinhoFernandes Is it mostly management or mostly combat?
 
@Mysticial how did the interviews go?
 
10:08 PM
why is vector::front noexcept, but vector::back isn't?
 
@bamboon green light for a walk in next week
 
@Mysticial very cool, what did they ask you?
 
@EtiennedeMartel Combat.
 
@bamboon A lot of technical stuff about how y-cruncher was designed managed and written. Then he went on so stuff about x86 and then to the workflow at Apple.
 
sbi
@MooingDuck Because they assumed that nobody would look at the back(), so it'd be enough to keep the front() tidy?
SCNR.
 
10:13 PM
@MooingDuck Neither is noexcept according to cppreference
 
@Praetorian wait, was I at cplusplus.com again? frick
 
sbi
@MooingDuck If it's a wiki, it's Ok. Otherwise, it's bad. Sadly, google put the wrong one atop when I searched today.
 
@Mysticial cool, so it was more you telling them than they asking crazy questions?
 
@MooingDuck Just checked the standard too, not noexcept. Seems to me like they both should be, but maybe there are implementations out there that throw if you call either on an empty vector
 
@bamboon There were mostly interested to see how capable I am in designing and optimizing code.
So the best thing was just to probe y-cruncher.
I said a few things that I could tell he didn't like.
 
10:17 PM
Such as?
 
^^
 
I emphasize "didn't like" because it's hard to say that it's "wrong" since y-cruncher clearly is a working program.
 
@Praetorian I was thinking they should not be, and they definitely should throw
 
@Borgleader He didn't like my bottom-up approach to optimization.
Obviously though.
Because it's a big company with deadlines.
So you can't bottom-up optimize anything - it's too time-consuming.
and not guaranteed to deliver a working product in time.
 
I wouldn't be a bit surprised if they were noexcept and calling them on empty vector was UB
 
10:19 PM
@Mysticial Yeah but in your case it made sense. You didn't have any deadlines. And your time didn't cost anything so to speak, so time consuming isn't an issue either.
 
Are you working at Apple
Can you infiltrate and disband them from inside
 
@EtiennedeMartel Actually, it's mostly losing.
 
@Borgleader Yeah, pretty much. And I wasn't going to lie to him either. He asked how it was done, I told him how it was done.
 
does boost have an iterator that I can construct from a value and every time I "dereference" it will give me that value back?
function_input_iterator and permutation_iterator look like they could do it, but both seem like serious overkill
 
user142019
I’m not sure if Boost has cyclic iterators, but if it does you can just use that with one element.
 
10:25 PM
Write one, it's trivial
 
@CatPlusPlus I know, and that was my first reaction. Thought I'd check though
 
sbi
@FredOverflow Of course, it would. I wouldn't mind compiling on the SSD, though. :)
 
yes...!
..\src\liter.h:54:43: internal compiler error: in tsubst_copy_and_build, at cp/pt.c:14441 Please submit a full bug report,
 
user142019
Wat? Again? What is it with all these idiots murdering people.
 
sbi
10:27 PM
@JerryCoffin Oh, I can understand the idea behind it, too. However, that doesn't mean it isn#t costing you more than you gain if you keep braking out knowledgeable employees. And it certainly doesn't mean WinXP is usable as a non-admin user.
 
> Most of the attackers have been mentally disturbed men involved in personal disputes or unable to adjust to the rapid pace of social change in China, underscoring grave weaknesses in the antiquated Chinese medical system's ability to diagnose and treat psychiatric illness.
Yeah right. Like the West is so much better ...
 
sbi
@R.MartinhoFernandes Ah, it's just the first time you have any considerable influence that diverges from what you were taught at home. :) (Also, @Xeo is right.)
 
What is a "gun show"?
 
user142019
Does anybody here run Linux on a MacBook?
 
@R.MartinhoFernandes The world is going nuts...
 
10:29 PM
@R.MartinhoFernandes people gather to buy and trade guns
 
sbi
@MooingDuck Nope. I haven't used VS for C++ in years. I don't even have access to VS Pro currently.
 
@MooingDuck Is it true that you can buy guns at gun shows without any sort of ID?
 
sbi
@R.MartinhoFernandes This?
@R.MartinhoFernandes I think you can buy a gun at the supermarket in the US. (You definitely can buy ammo.) There's this famous scene at the beginning of Bowling for Columbine where Moore opens an account at a certain bank and is given a gun, because they give away a free gun to everybody opening a bank account.
 
@R.MartinhoFernandes I know there's lots of laws involved, I seriously doubt it (legally)
 
sbi
@R.MartinhoFernandes You might want to read this.
 
10:32 PM
@sbi you can buy guns at the store, but you have to register and wait for 4 days before they give it to you.
 
sbi
@MooingDuck But that's state law, not US-wide, right?
 
@sbi I thought it was US-wide, but I'm not certain
 
sbi
@MooingDuck Well, you would certainly know better then me. :)
 
there are some federal and some state laws w.r.t how long you have to wait and what checks are used
and it also depends on the type of firearm you want to buy
 
10:35 PM
@R.MartinhoFernandes: en.m.wikipedia.org/wiki/…
 
user142019
Time to download Arch Linux and xmonad.
 
sbi
@netcoder Here it's in non-mobile form, including the closing parenthesis.
 
Heh, universal references with constexpr.. crashes gcc4.7.2. But I think it should be allowed.. ?
 
@sbi lol, you caught me :/
 
sbi
@JohanLundberg Whether it is allowed or not is irrelevant for the crash. A compiler should not crash, ever, no matter whether the code you throw at it is allowed or not.
 
10:38 PM
yes sure. I'm reporting it now
 
Try newest snapshot before reporting anything
 
Chat.SO sucks on mobile, especially the desktop version
 
@CatPlusPlus All right.. hmm
 
Oh no my game is downloading only 3MB/s
Steam, whyyy
 
Only???
 
10:40 PM
Is 3MB/s supposed to be a bad thing?
 
Is this legal ?
template<typename A,typename B>
constexpr long long mymax(A&& a,B&& b){
return a<b?std::forward<B>(b):std::forward<A>(a);
}
 
@netcoder Wow, seems there's barely any kind of firearm registration whatsoever.
 
It's definitely weird
 
Yes that is for sure
It's me trying to reproduce the error.
 
std::forward does nothing here
 
sbi
10:42 PM
@netcoder Over a telephone modem, no.
 
Nothing useful at least
 
@CatPlusPlus It does: it obfuscates the code
 
@R.MartinhoFernandes I was thinking the same thing...
 
well, no especially since it's going into long long
 
@CatPlusPlus It may end up picking between operator long long() & and operator long long() &&.
 
10:42 PM
again, this is not the real code
 
I found something cool:
58
Q: The "Rules" of Writing

sjohnstonThere are a lot of axioms that get tossed around in creative writing courses, books on writing, and of course, the internet. Often, these little gems are explained to new writers as though they were fact, to be taken for granted. Just as often, experienced writers will respond by saying "there ...

 
@netcoder And "open carry" of handguns seems quite common too.
Hawaii seems to be the sanest state.
 
Ell
The Hobbit is amazing
 
sbi
@R.MartinhoFernandes What would they need firearms for, practically living on a bunch of active volcanoes?
@Ell Which one now? As I understood it, the Shire is full of them.
 
Ell
The film :3
 
10:46 PM
@JohanLundberg Initializing a long long from another type is a copy, anyway. Why do you want to forward?
 
sbi
@Ell Which one now? As I understood it, there's three of them.
 
Ell
Saw it today, its on par with the LotR trilogy, they are my favourite films
The first one
 
sbi
SCNR.
 
@R.MartinhoFernandes Heh. Open carry doesn't bother much though. Concealed carry is disturbing. At least if everyone carries his gun openly, you know who to watch.
 
@FredOverflow haha, again this is just an example to reproduce a compiler bug
 
Ell
10:46 PM
the second and third aren't made yet :(
 
sbi
@JohanLundberg I am sorry for you. You have been repeating this for 15mins now, and still people come into the discussion pretending not to know what a repo is. In the C++ room!
 
@sbi ;)
 
@netcoder Unless they planned for trouble, in which case they will likely not carry it openly.
 
user1182183
bool LoadScript(std::string script)
{
	ScriptInfo temporary(script);
	if(temporary.Initialized)
	{
		scripts.push_back(temporary);
		return true;
	}
	return false;
}
 
user1182183
the destructor for ScriptInfo would be called here for temporary, hwo to avoid that? std::move?
 
10:50 PM
@FredOverflow It's not, dammit.
 
@GamErix what else would you do with it besides destroy it? Where would you move it to?
 
sbi
@GamErix Why would you want to prevent it?
 
7 mins ago, by R. Martinho Fernandes
@CatPlusPlus It may end up picking between operator long long() & and operator long long() &&.
 
@R.MartinhoFernandes Heh, more than likely. Although not being required to get a permit to own a gun in (most of) the US is what I find the most disturbing of all.
 
user1182183
@sbi so the loaded script doesn't get unloaded
 
10:50 PM
@GamErix oh, scripts.push_back(std::move(temporary));
 
@R.MartinhoFernandes What's the difference between copying into a long long and moving into a long long, then?
 
user1182183
@MooingDuck oh thanks :)
 
8 mins ago, by R. Martinho Fernandes
@CatPlusPlus It may end up picking between operator long long() & and operator long long() &&.
 
:) I created a monster
 
sbi
@GamErix This scripts.push_back(temporary) creates a copy of it. Why wouldn't you want to destroy a temporary when you don't need it anymore?
 
10:51 PM
FFS, I don't want to repeat this any more.
 
One more time, please.
 
sbi
@R.MartinhoFernandes Nobody was asking you to repeat it.
 
the universal reference points to a constant
 
user1182183
:6714093
	~ScriptInfo()
	{
		if(this->Initialized)
		{
			int tmp;
			if (!amx_FindPublic(&this->amx, "OnScriptExit", &tmp))
				amx_Exec(&this->amx, (cell*)&tmp, tmp);
			aux_FreeProgram(&this->amx);
			DoAmxUnload(&this->amx);
			amx_TimeCleanup(&this->amx);
			amx_FileCleanup(&this->amx);
			amx_StringCleanup(&this->amx);
			amx_FloatCleanup(&this->amx);
			amx_CoreCleanup(&this->amx);
		}
	}
 
Oh!
 
10:52 PM
@GamErix You cannot address code to somebody.
 
user1182183
@FredOverflow true :x
 
@GamErix this->Initialized looks like you allow for zombie objects. Not a good idea in general.
 
sbi
@FredOverflow Yes, he can.
 
user1182183
@FredOverflow zombie objects? ; o
 
sbi
@GamErix Why are you showing me that?
 
10:53 PM
@GamErix Objects that live, but are not "initialized" are anti C++.
 
user1182183
@sbi so you can see the loaded script gets unloaded at destruct :P
 
sbi
@GamErix But I don't want to see this.
 
user1182183
@FredOverflow or I do that or I call the destructor from the constructor...
 
So, turns out even const T& x causes a crash, nothing to do with perfect forwarding then...
 
sbi
Hint: If you have a problem with this, it's likely in your copy constructor/assignment operator.
 
10:53 PM
@GamErix Calling the destructor from the destructor does not make any sense. How often do we have to go over this?
 
user1182183
@FredOverflow read again :)
 
Wrap your cleanups in RAII and you're good, not need to manually free anything.
 
user1182183
@FredOverflow ideone.com/T0NgRB
 
sbi
@GamErix How about you get yourself a good C++ book? Seems necessary.
3 mins ago, by FredOverflow
One more time, please.
 
@sbi Agreed.
 
10:55 PM
@GamErix I can't see the whole constructor at once in my screen.
 
sbi
@GamErix Burn this. Right now. And scatter the ashes over a wide area. Also destroy everything that was contaminated with this code, like your HD, and the RAM. (I hope you hadn't printed it.) Meanwhile, we'll move to wipe out ideone.com.
 
He's complaining that it's too big.
 
Greetings fellow inmates.
 
user1182183
@R.MartinhoFernandes should I make a Initialize() member then?
 
10:56 PM
@FredOverflow It doesn't make sense, but as I recall it also leads to UB doesn't it?
 
@Chimera Howdy.
 
@GamErix Wtf?
 
@R.MartinhoFernandes Hello Robot.
 
@GamErix You should put your amx_foobarInit functions in RAII wrappers. Then you don't need to manually clean up anything,
 
@GamErix If you mean "write another function so that the constructor fits on the screen, but the function won't", that won't change a thing.
 
user1182183
10:57 PM
@netcoder make a function in that struct which loads the requested filename? :P
 
What ever you do, don't stall the watchdog!!!!!!!!!!!!!!!!!!!!!!!
 
user1182183
@sbi luckily I didn't tick "run"
 
sbi
@GamErix You should have ticked "run". All one can do with such code is to run for the hills.
4
 
user1182183
@sbi :(
 
@sbi And beware the friggin' watchdog!!!!! Ahhhhh!!!!
 

« first day (790 days earlier)      last day (4173 days later) »