Search found 190 matches

by cyboryxmen
June 27th, 2016, 6:00 pm
Forum: Everything
Topic: What good are unsigned ints?
Replies: 8
Views: 3011

Re: What good are unsigned ints?

Unsigned ints are very useful in memory management because they can represent the full range of standard containers. I faintly remember that there is a bug in a Java sorting algorithm where they add two ints together and divide the result in order to get the middle index and that caused a memory lea...
by cyboryxmen
June 12th, 2016, 1:48 pm
Forum: Everything
Topic: Tutorial Reboot Framework Suggestions
Replies: 18
Views: 6824

Re: Tutorial Reboot Framework Suggestions

I suppose a way to get people to feel like they are not being constrained by the framework is to get them to buy into the idea that this is how programming works. Talk about how if say you want to make programs that work with Windows, you still need to use windows specific code like WinMain and appe...
by cyboryxmen
June 10th, 2016, 5:50 am
Forum: Everything
Topic: How dangerous is this class exactly?
Replies: 15
Views: 5540

Re: How dangerous is this class exactly?

P.s. Do take note that the typelist in the test here is bugged. This is because the typelist terminates on void so typing void into the list can terminate it prematurely. The typelist automatically adds void to the ends of the list anyway so there is no need to type void in one of its template param...
by cyboryxmen
June 10th, 2016, 4:13 am
Forum: Everything
Topic: Didn't know enum classes existed in C++
Replies: 4
Views: 2135

Re: Didn't know enum classes existed in C++

The scoping is one of the advantages of enum classes. Enums are primary used for switch statements because it's a good way to describe in code which test case you are going to call. Enum classes add a level of type safety to your code by making them actual types rather than fancy numbers preventing ...
by cyboryxmen
June 10th, 2016, 3:47 am
Forum: Everything
Topic: How dangerous is this class exactly?
Replies: 15
Views: 5540

Re: How dangerous is this class exactly?

Here is a test I did in main.cpp void main() { using Room = shared::Room<std::size_t, int, unsigned, short, char, float, double>; Room room; room.CheckIn(int(5)); if (room.GetCurrentOccupant() == Room::EnumClass::IndexOf<double>::index) { std::cout << room.Visit<double>() << std::endl; } if (room.Ge...
by cyboryxmen
June 9th, 2016, 3:33 pm
Forum: Everything
Topic: How dangerous is this class exactly?
Replies: 15
Views: 5540

Re: How dangerous is this class exactly?

Why do you use const rvalue references when you are trying to use move semantics, and why no std::move or std::forward? That was a mistype. The r-value references were supposed to be non-const. I have tried simple types like int, float and char as three of the parameters, but keep getting error Err...
by cyboryxmen
June 8th, 2016, 9:57 am
Forum: Everything
Topic: How dangerous is this class exactly?
Replies: 15
Views: 5540

Re: How dangerous is this class exactly?

why not just delete it? Room& operator=(const Room&) = delete; I was unaware of that syntax. Thanks for the advice. I'm going to change all my code to use this instead. It really does seem that this class is the best solution to my problems and from what you guy's have posted, it may not be as dang...
by cyboryxmen
June 8th, 2016, 8:03 am
Forum: Everything
Topic: How dangerous is this class exactly?
Replies: 15
Views: 5540

Re: How dangerous is this class exactly?

I guess what you need to ask yourself is, what's the goal? The goal at the beginning is simple: have 1000 instances of one of 56 different objects be stored in memory without the ridiculousness of having 56 arrays. I am also trying to avoid a "one struct for all" solution since that has a lot of pr...
by cyboryxmen
June 7th, 2016, 2:29 pm
Forum: Everything
Topic: How dangerous is this class exactly?
Replies: 15
Views: 5540

How dangerous is this class exactly?

For years now, I've been trying to figure out how to align different objects together in memory. This proved to be impossible since C++ does not allow you to put different objects inside one array. Most people usually do it by having an array of pointers and then using new() to create those objects ...
by cyboryxmen
November 14th, 2014, 2:35 am
Forum: Everything
Topic: What is the purpose of Chili's Framework
Replies: 5
Views: 3331

Re: What is the purpose of Chili's Framework

Well nowadays, graphical functions are done by the graphics card in a computer like drawing pixels on the screen and clearing it. However, there are tons of GPUs out there and they all speak in their own "language". To avoid having programmers set up different codes for each and every GPU out there,...