BinaryByter
olli
only if you access the protected member through your derived object
BinaryByter
So only this->?
BinaryByter
Thats bullshit
olli
no
BinaryByter
But then, why doesnt this work?
BinaryByter
Ive done that several times in zeneural
olli
struct F {
protected:
int g;
};
struct X : public F {
public:
void bar(F & f, X & x) {
this->g = 2; // fine
x.g = 2; // fine
// f.g = 2; // error
}
};
BinaryByter
Oh i see
BinaryByter
So. How can i best test for the vector's size?
BinaryByter
Preallocation*
BinaryByter
using capacity() would prolly be bad since it requires capacity to work
olli
Possible solutions include: testing on this, using friend, pimpl
BinaryByter
Testing on this is a good idea
BinaryByter
I'll do that
BinaryByter
Cluttering my vector with friend isn't exactly the best woy to unit test, imho
BinaryByter
Pimpl?
BinaryByter
Parallel implementation?
BinaryByter
No thanks xD
olli
Pointer to implementation / private implementation
BinaryByter
Oh ok
Ludovic 'Archivist'
Don't inherit, use friend class
BinaryByter
huh?
BinaryByter
if I don't push the friend statements in vector, your clinl won't compile
BinaryByter
our*
BinaryByter
everybody's*
Ludovic 'Archivist'
The friend statement indeed go into kstd::vector
BinaryByter
BinaryByter
it has got to be maintainable
BinaryByter
lol
BinaryByter
besides
BinaryByter
I don't want to get my spankings by @OxFFFFFFFF
BinaryByter
😢
BinaryByter
BinaryByter
or so
BinaryByter
depending on the amount of tests
BinaryByter
Ludovic 'Archivist'
20*
Just
friend testEmptyConstructor
Ludovic 'Archivist'
Make all the tests in a single class then
Ludovic 'Archivist'
Split by function only
Ludovic 'Archivist'
Inheritance is worse
BinaryByter
Ludovic 'Archivist'
It makes testEmptyConstructor a kstd::vector
BinaryByter
BinaryByter
feck why won't this shit work?
BinaryByter
ibroheem told me that it's good
BinaryByter
BinaryByter
I thought that
<type> namespacename::<functionname> (<args>);
was a thing
BinaryByter
BinaryByter
nope doesn't work
BinaryByter
Anonymous
Hi
Anonymous
I want to ask you something...
Anonymous
Can and how I make a game like lootbot in c++?
BinaryByter
no C++ is only for building compilers
BinaryByter
you can't do any graphics with C++
BinaryByter
on the other hand, try to google it, maybe it works
BinaryByter
Unit testing made me already fix one bug :D
BinaryByter
time to debug the fill constructor ;_;
BinaryByter
though I like this pattern
BinaryByter
Dear C++
BinaryByter
Integers
BinaryByter
are
BinaryByter
NOT ITERATORS
BinaryByter
FOR FUCK'S SAKE
Julian
BinaryByter
Wat
i'm trolling those who can't google
Julian
Oh ok
Dima
you can do super 3d raytraced realtime graphics with javascript
BinaryByter
CAN, not SHOULD
Dima
and should
Dima
its ultimate solution
Dima
1. crossplatform
2. over9000 + 5k libraries
3. ???
4. profit
Dima
no need to care about data oriented design
BinaryByter
I love js because I can easily check if my class instance is a prime or not
Dima
bruh
Dima