« first day (681 days earlier)      last day (2168 days later) » 

9:12 AM
@ratchetfreak haha that is good, i have to remember this.
 
9:22 AM
i need a good approach for a conversion between QVector<QVector3D> and std::vector<VertexData> coliru.stacked-crooked.com/a/5ecfcf43d285ef85
qt has the static function QVector<T> fromStdVector(const std::vector<T> &vector)..
 
nwp
std::transform with std::back_inserted should do it.
 
thx nwp ....std::transform is new to me
 
nwp
It probably makes sense to write some QVector<QVector3D> to_qvector(const std::vector<VertexData> &); function and the other way around so you don't need to mess with std::transform every time.
 
10:01 AM
 
nwp
You could add v.reserve(s.size());, but yeah, that should be good.
 
though if you are going to also have a function to extract the normals you may want to mention pos in the function name
 
@ratchetfreak toQVectorPos(...) toQVectorNormal(...) ?
@nwp amazing....maybe i can reuse the Conversions namespace and put in these functions there.
like this in my GeometryNode class: namespace Conversions { QVector<QVector3D> toQVector(const std::vector<VertexData>&); QVector<quint32> toQVector(const std::vector<TriangleData>&) };
 
 
4 hours later…
1:51 PM
How to adequately enforce compilers to use a _single_ (root) directory within a project as an include directory (and disallow cwd for that)
(In order not to be able to compiler stuff like `#include "../../../../file.hpp"`
I dunno formatting for multiline messages is totally broken :(
 
nwp
chroot should work for that on not-windows.
Maybe you can use subst on windows.
 
@nwp could you elaborate please? :) how would I use chroot for this?
 
nwp
You chroot into your root directory and run the compiler. The compiler cannot (doesn't) break out of the chroot environment and hence doesn't access anything outside that directory.
 
Well, as I see it, it should of course see the standard (and boost and so on) lib paths so I can't limit chroot to the project
Basically I think what I need I just to exclude cwd from include dirs for project files
Yet I had a hard time finding how to do that :(
But as I see major projects use that way
For example llvm or boost hana include corresponding headers (or other headers in case of hana) via full paths always (almost?)
Do they really control all that manually?
 
nwp
2:07 PM
I cannot imagine llvm and boost using absolute paths for includes. That seems like a terrible idea, especially for those projects.
 
@ledonter I'd expect the compiler to guard against files trying to escape the set include or source dirs through includes
 
nwp
You can mount stuff into chroot so that it has access to system headers.
 
@nwp I mean absolute relative to the project, sorry :) however I just realized that they are keeping include and src separate, then there's not much choice..
But in other case (cpp and hpp side by side) it seems not that obvious
Mounting into chroot makes sense though, will try probably, thanks
 
nwp
@ledonter Use the little arrow that appears on the right side of a not-your message on mouse-over when replying to a specific message.
@ratchetfreak Typing #include "/etc/passwd" into online compilers is pretty standard.
 
@nwp pretty sure if you search pretty much every compiler bug reporting system there is some variant of this reported as a vuln with a 'Won't fix' on it
 
 
3 hours later…
5:04 PM
nice...if i define a dtor for a struct i cant initialize it via curly braces.
 
You can't aggregate initialize it, since it's not an aggregate
Just add a constructor, and you can use braces again
 
5:22 PM
i thought with an std ctor i dont injure a aggregate
 
std ctor?
@Justin Seems I may have misread. I don't see it mentioning destructors in what it means to be an aggregate...
@FerencRozsa Example? I don't see this happening: godbolt.org/g/vufu3S
 
5:40 PM
@FerencRozsa That's a constructor, not a destructor. Thought you mean destructor; "dtor" = "destructor". But yeah, constructors make a type not an aggregate.
 
"But yeah, constructors make a type not an aggregate." realy ? I dont define i userdefined ctor its just the std ctor.
 
@FerencRozsa "no user-provided constructors (explicitly defaulted or deleted constructors are allowed)"
So you could write Material() = default; and that would work too
 
ah o.k.
 
Although in this case, I'd use in-class initialization: coliru.stacked-crooked.com/a/e2206a67b4a10c65
 
6:10 PM
@Justin hm that doesnt work...
...its the in-class init of the two float values
 
6:26 PM
@FerencRozsa It works in coliru that I showed there. I aggregate initialized it
 

« first day (681 days earlier)      last day (2168 days later) »