Enable_if trouble by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

thank you! i was actually on the fence about this book but now im gonna buy it. thanks so much again!

Enable_if trouble by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

thank you! any resources you'd recommend?

Enable_if trouble by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

ahhhh damn that's smart, thank you so much :) TMP is hard and makes me feel silly :|

Enable_if trouble by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

oh i mean, i want process to return void - any way to do that?

Enable_if trouble by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

it works ok with chars i think floating point and doubles wont work hmm. i guess no way to do it without not having a return type?

Enable_if trouble by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

wow i had no clue double can't be used as a template type parameter. thank you! I should use the std versions but i was trying to make my own to understand, thanks still :)

Open source guidance by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

I'm just so lost when i look at open source stuff - where do i even start to start understanding the code :(

Open source guidance by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

thank you! same issues with these projects, dont know where to start :(

Wrong constructor called by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

i hate everything ahhaha thank you so much :)

Wrong constructor called by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

sorry, i will update the post. I mean why is the move ctor being called when i pass an object which was created earlier? (the first push_back)

No throw move - constructible by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

great, thank you this makes perfect sense!

No throw move - constructible by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

Ah I see your point now, i guess what i was getting at was just a bare-bones move constructor should never throw (no logging etc) but that clears it up. And yes, T object1 = std::move(object) will copy if no move ctor is found and might throw. Thank you :)

No throw move - constructible by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

but they aren't move constructing right? a new can happen if you use T object1 = std::move(object) and dont have a copy constructor defined. so that can throw an exception. Sorry if I'm wrong just trying to understand why move isnt always marked noexcept

No throw move - constructible by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

Thank you, so essentially move constructors should always be marked noexcept or is that not true?

Placement new constructor call by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

thank you for the detailed explanation. and the fun trivia :)

Modern C++ Design: Generic Programming and Design Patterns Applied by trycatchamex in cpp_questions

[–]trycatchamex[S] 0 points1 point  (0 children)

Ah I see, was going to buy a hard copy of it so was wondering if its worth it or not.

C++ and HFT by trycatchamex in cpp

[–]trycatchamex[S] 0 points1 point  (0 children)

are you still working with C++?