Ludovic 'Archivist'
stop it with constexpr everything
on the reverse, you should make as much constexpr as you can
BinaryByter
on the reverse, you should make as much constexpr as you can
Constexpr is just a subtle hint to the compiler. constexpr clutterd code
BinaryByter
it clutters code A LOT
BinaryByter
so IMHO, atleast in time insensitive applications, constexpr everything is bs
BinaryByter
+ the compiler optimizes alot by itself already
Ludovic 'Archivist'
Constexpr is just a subtle hint to the compiler. constexpr clutterd code
constexpr is not a subtle hint, it is a property that is transitive
BinaryByter
Measured with time?
BinaryByter
time isnt too accurate, tbh
Ludovic 'Archivist'
Oh?
a whole cascade of constant expressions can affect very complex computations
MᏫᎻᎯᎷᎷᎬᎠ
Mark the function with const
BinaryByter
a whole cascade of constant expressions can affect very complex computations
I see... But isnt there a way to add it more subtly?
MᏫᎻᎯᎷᎷᎬᎠ
getArea() const
Ludovic 'Archivist'
I see... But isnt there a way to add it more subtly?
not while keeping constant expressiveness that can be used in templates too
Ludovic 'Archivist'
constexpr int getArea() const{ return _h*_w; }
MᏫᎻᎯᎷᎷᎬᎠ
Constexpr is a compile time thing
MᏫᎻᎯᎷᎷᎬᎠ
You have to mark your function with const so that it confirm you are not changing anything
Ludovic 'Archivist'
Constexpr is a compile time thing
not exactly, it means the expression is devoid of side effects on any element
BinaryByter
BinaryByter
will the compiler still constexpr stuff?
Ludovic 'Archivist'
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
I should get into constexpr more
MᏫᎻᎯᎷᎷᎬᎠ
That is the first time i help someone and been a useful guy
MᏫᎻᎯᎷᎷᎬᎠ
That is the first time i help someone and been a useful guy
This sentence is grammatically correct, right?!
MᏫᎻᎯᎷᎷᎬᎠ
Read C++ standards And take it as a reference
MᏫᎻᎯᎷᎷᎬᎠ
Not by value lol
Anonymous
hello
Anonymous
in the case of this error
Anonymous
C:/cygwin64/home/KovacsAdam2/libreoffice/chart2/source/model/template/ChartTypeTemplate.cxx(481): error C2440: '=': cannot convert from 'com::sun:⭐:uno::Any' to 'com::sun:⭐:uno::Any *'
Anonymous
what should i write instead of this?
Anonymous
newAttributesList[i][j][k] = uno::makeAny( (sal_Int32)Value );
Anonymous
i tried * and & in the frond of
Anonymous
front of
Dima
MᏫᎻᎯᎷᎷᎬᎠ
dafaq? 3 indexes?
The ultra programmer lol
BinaryByter
No
BinaryByter
3 indexes are bad
MᏫᎻᎯᎷᎷᎬᎠ
Are those types?
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
I like that one xD
MᏫᎻᎯᎷᎷᎬᎠ
Like You cannot convert int* to int
MᏫᎻᎯᎷᎷᎬᎠ
Whatever your type is
MᏫᎻᎯᎷᎷᎬᎠ
newAttributesList[i][j][k] = uno::makeAny( (sal_Int32)Value );
that means makeAny returns a pointer of type Any
BinaryByter
imho
MᏫᎻᎯᎷᎷᎬᎠ
You can't reserve something on the heap to the stack
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
Probably he is practicing
MᏫᎻᎯᎷᎷᎬᎠ
From makeAny
MᏫᎻᎯᎷᎷᎬᎠ
Factories
BinaryByter
yes
BinaryByter
eww
BinaryByter
design patterns
BinaryByter
design patterns are antipatterns
BinaryByter
/runs
BinaryByter
xDD
BinaryByter
Yup
MᏫᎻᎯᎷᎷᎬᎠ
You can't reserve something on the heap to the stack
You are like saying int x[1] = new int;
MᏫᎻᎯᎷᎷᎬᎠ
design patterns
I do wanna learn it
MᏫᎻᎯᎷᎷᎬᎠ
It seems awesome
BinaryByter
Lolno
MᏫᎻᎯᎷᎷᎬᎠ
Lolno
Well That's is one of requirements to be a SE
BinaryByter
SE?
MᏫᎻᎯᎷᎷᎬᎠ
Software engineer
MᏫᎻᎯᎷᎷᎬᎠ
I didn't make that up
BinaryByter
lol
MᏫᎻᎯᎷᎷᎬᎠ
XD
BinaryByter
just dont become one
MᏫᎻᎯᎷᎷᎬᎠ
just dont become one
I'm studying it
BinaryByter
and you wont have to learn design patterns
MᏫᎻᎯᎷᎷᎬᎠ
Uni
BinaryByter
>:]
MᏫᎻᎯᎷᎷᎬᎠ
Se is perfect
MᏫᎻᎯᎷᎷᎬᎠ
❤️