« first day (1463 days earlier)      last day (1373 days later) » 

1:56 AM
@ApoorvaAnand Aww.. :d
@all
Anyone guess why this is happening
for (unsigned short index = 0u; index != NUMBER_OF_TESTS; ++index)
test(index); // Fails at indices 69, 420, and 2020

test(69); // Succeeds
test(420); // Succeeds
test(2020); // Succeeds
I know, there's not much context here but I'd still appreciate an opinion regardless.
Or nevermind.. I won't get an opinion unless I heavily edit it as an acceptable & interesting question anyways...
 
3:00 AM
@Lapys Maybe some other index modifies a global variable that makes test fail for those cases while iterating?
 
3:21 AM
@ApoorvaAnand
Yea, I wish. Did a lot of digging in the code (which was hellish) and it turns out it has something to do with the memory structure of objects being tested in the `test()` cases since I'm using bit fields and `malloc` &`realloc`.
 
 
17 hours later…
8:48 PM
How do dependencies work in C++? Is their a dependency manager like NPM for JS?
 
@JBis nope, stuff's a lot more old school for the most part
there's stuff like conan that kind of works like npm
 
so do you just have to run it and wait for errors to see what libraries you need?
 
Depends on the build-system you use, if you use something like CMake then you do it in a more structured way
 
go on...
 
but even then libraries don't universally do things like semantic versioning
it's really a case-by-case thing
 
8:51 PM
so lets say i want to use library X, theres no standard way to do that?
 
The best universal advice is "read the readme"
The fundamental way is the same, as in, include the headers and if there's libraries link them. But how those are done exactly is not always the same
 
hmm ok thanks
 
 
2 hours later…
11:13 PM
hey guys, I have a std::shared_ptr<Base>. how do I check whether the stored pointer is of type "Superclass"?
I have tried:
std::is_same<std::shared_ptr<Superclass>, decltype(shared_ptr_instance)>::value
>_>
 
11:51 PM
0
Q: Check whether the current underlying type of a std::shared_str<> is T

HenriI have a shared pointer storing a base class, like this: std::shared_ptr<Base> baseClassPointer; How do I check whether it is currently holding an instance of an SuperClassA? Where: public class SuperClassA : public Base {} // There can be many other superclasses I've tried something like below...

 

« first day (1463 days earlier)      last day (1373 days later) »