I need to implement integer to float conversion but I cannot find any good sources. I cannot use any type casting, I need some solution using simple math and bitwise operations. Anyone?
detect and add source files according to file extension if general type SOURCE is given: check. Next up: generate compile commands. Then: execute commands. Then: bump version to 0.1.0: self-hosting achieved!
@RMartinhoFernandes Thanks, that would be awesome (probably something for in something like two or three weeks, maybe a month or something). Or if you want to bash code right away, by all means, break down my ego.
The local puppy @DeadMG already bashed my lexer. Which I knew was ugly.
So I have this naming conundrum now. I have an enum named general_category which represents a, uh, a general category. I want to have a function to retrieve the general category of a codepoint, i.e. general_category general_category(codepoint u);. That's not gonna fly with those names. Request advice.
Yeah, I thought of the get_ prefix too. What irks me is that I'll have to add it to all other property queries, even those without name colisions. Consistency trumps characters saved, I guess.
it's sad how there are plenty of websocket implementations for C and C++, but none which can be layered on top of existing socket code. They all assume that they should handle (and hide) the low-level socket stuff
The allocator has nothing to do with object initialization, it's only purpose is to allocate/deallocate memory, initialization of the give memory segment is done elsewhere.
std::vector only uses the default-constructor of the type it holds in two situations:
You specify the number of element...
@Xeo yeah I know, I've no idea what was going through my head when writing that. (hint the: "wait, what!?" is my reaction to reading my own writing)
if anyone wanna screenshot the part where I say the above there is a nice little note where I admit being retarded, you might use it against me in the future
If you have an object with mutexes in it, you don't make any member functions const, because you would have to use mutable on the mutexes. At least that's when I dropped the towel. Now I'm going to do some work.
I would like to define a class that looks like this:
class IHaveVirtualDestructor
{
public:
virtual ~IHaveVirtualDestructor();
};
And I would like all my interface and abstract classes to inherit this class. Is it a good practice? Or should every interface/abstract class define its own vir...
@RMartinhoFernandes but you can define a non-virtual destructor in blah_blah_base, and every class inheriting that won't know about the virtual destructor?
@RMartinhoFernandes it's a base class only for the virtualness of the destructor. Write the base class you want for your polymorphism and make its destructor virtual. Sheesh.
@rubenvb Yes, and you make its destructor virtual by easily deriving from an existing class. It's the same idea as deriving from boost::noncopyable just for the private ctors.
@rubenvb there are rumors saying that I have too many flags pointed towards me, therefore I try to censor the motherfucking words that might annoy the niggerish out of some fucktards.
@refp You should learn to use censorable words only when they add to the point you're making. You are now officially a moron in my book for blabbering fuck all over the place for no decent reason. Brad Pitt in Se7en did not need a reason, cause that's a fucking awesome movie.
c++11
With the new standard added functionality was granted to objects of Allocator type.
One of the features added was that Allocators now allows emplacement construction, aka. construction of objects using a constructor other than copy/move.
I wouldn't recommend using an Alloc...
anyone know the requirements put by the standard on containers in the STL in C++11 in regards of Allocators?
I bet @DeadMG is going to appear soon telling me he down-voted it because I should have just written; "what's the matter with you boy, just implement a default-constructor!!!1"
So seems to me a better analogy would be that C++ is trying to freshen up its backwards compatibility poo, perhaps dillute it with more fresh water, whereas Python tried to climb out, and ended up falling face-first back into it
@rubenvb I think they have several ways to handle it, but you can send them some documentation on it, and they'll either close the profile or turn it into some kind of memorial thing
@rubenvb use windows and you don't have to worry about building things, you'll be busy fighting malware.. (yes, 2003 called and wanted their "anti windows"-sentence back)
@StackedCrooked There's got to be an emacs command for that.
user784668
@rubenvb Aye.
user784668
>> gcc -x c - -S -o -
#include <stdio.h>
int x = gets;
.file ""
<stdin>:2:1: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
<stdin>:2:9: warning: initialization makes integer from pointer without a cast [enabled by default]
<stdin>:2:1: error: initializer element is not computable at load time
@StackedCrooked But seriously, do what I did when I had the same problem, and call your landlord to send you the electrician who did the wiring in your apartment.