Igor🇺🇦
From my experience it's actually not that useful, because in many cases compiler already calculates what it can without constexpr. What it cannot calculate during compilation won't be calculated with or without constexpr. It's like "inline" great in theory, mostly useless in practice
....
Any kind of loops based on 3 catagorized
Igor🇺🇦
Its so difficult
This site only prints what is written in standard. Not very useful if you want to learn new subject. Try this explanation: https://blog.smartbear.com/development/using-constexpr-to-improve-security-performance-and-encapsulation-in-c/
Ибраги́м
Igor🇺🇦
OK
Ибраги́м
Constexpr does what inline cannot do. Plus constexpr is implicitly inline
Ибраги́м
And inline only functions are evaluated at runtime, mostly
Ибраги́м
Unless it's highly obvious it can be done in CT
Igor🇺🇦
Constexpr does what inline cannot do. Plus constexpr is implicitly inline
I didn't say that constexpr is the same as inline. I said that they are both hints for compiler and it can decide to ignore it or do the same even without these hints. The main advantage is when you want to instantiate array or templates.
Aurangzeb
I need some c++ programming notes and videos of programming
Anonymous
ISO C++ Official Homepage: - https://isocpp.org ISO C++ committee - https://isocpp.org/std/the-committee FAQs - http://www.stroustrup.com/bs_faq.html (I actually read this all) - http://www.stroustrup.com/bs_faq2.html - https://isocpp.org/faq - http://www.stroustrup.com/C++11FAQ.html Reddit (reddit.com) - http://reddit.com/r/cpp - http://reddit.com/r/cpp_questions (U can also ask questions here) Slack: - https://cpplang.now.sh/ Cpp Reference - http://en.cppreference.com/w/ Books (Books are the best way to learn in cpp): - https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list Online Tutorial: - http://learncpp.com - https://fbb-git.github.io/cppannotations/cppannotations/html/index.html Modern Cpp Features (C++11+): - https://github.com/AnthonyCalandra/modern-cpp-features C++17 - http://www.bfilipek.com/2017/01/cpp17features.html - https://jfbastien.github.io Youtube: - https://www.youtube.com/user/lefticus1/videos - https://www.youtube.com/channel/UCQ-W1KE9EYfdxhL6S4twUNw - https://www.youtube.com/channel/UCEOGtxYTB6vo6MQ-WQ9W_nQ Conferences: - CppCon: https://cppcon.org/ - BoostCon: https://www.youtube.com/user/BoostCon - Meeting Cpp: http://meetingcpp.com/ Blogs: - https://akrzemi1.wordpress.com/ - http://ericniebler.com - http://foonathan.net/ - https://herbsutter.com/category/c/ —---- Specific Topics (No particular order) —---- Concurrency & Parallelism: - http://www.bogotobogo.com/cplusplus/multithreaded.php - http://thispointer.com/c-11-multithreading-part-1-three-different-ways-to-create-threads/ Networking: - ASIO:Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. - http://think-async.com/ - https://github.com/chriskohlhoff/asio/ - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3388.pdf: gives a brief, high-level introduction to how Asio may be used in conjunction with C++11. - - Evpp: https://github.com/Qihoo360/evpp - Moduo: https://github.com/chenshuo/muduo - Seastar: For real heavy lifting: https://github.com/scylladb/seastar - CppCMS — C++ Web Framework - http://cppcms.com Docs - http://cppcms.com/wikipp/en/page/cppcms_1x - Reference documentation: http://cppcms.com/cppcms_ref/latest/
Anonymous
@Aura_bilal
There are a few other stuff around that msg too
Anonymous
And this obviously
Ибраги́м
ISO C++ Official Homepage: - https://isocpp.org ISO C++ committee - https://isocpp.org/std/the-committee FAQs - http://www.stroustrup.com/bs_faq.html (I actually read this all) - http://www.stroustrup.com/bs_faq2.html - https://isocpp.org/faq - http://www.stroustrup.com/C++11FAQ.html Reddit (reddit.com) - http://reddit.com/r/cpp - http://reddit.com/r/cpp_questions (U can also ask questions here) Slack: - https://cpplang.now.sh/ Cpp Reference - http://en.cppreference.com/w/ Books (Books are the best way to learn in cpp): - https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list Online Tutorial: - http://learncpp.com - https://fbb-git.github.io/cppannotations/cppannotations/html/index.html Modern Cpp Features (C++11+): - https://github.com/AnthonyCalandra/modern-cpp-features C++17 - http://www.bfilipek.com/2017/01/cpp17features.html - https://jfbastien.github.io Youtube: - https://www.youtube.com/user/lefticus1/videos - https://www.youtube.com/channel/UCQ-W1KE9EYfdxhL6S4twUNw - https://www.youtube.com/channel/UCEOGtxYTB6vo6MQ-WQ9W_nQ Conferences: - CppCon: https://cppcon.org/ - BoostCon: https://www.youtube.com/user/BoostCon - Meeting Cpp: http://meetingcpp.com/ Blogs: - https://akrzemi1.wordpress.com/ - http://ericniebler.com - http://foonathan.net/ - https://herbsutter.com/category/c/ —---- Specific Topics (No particular order) —---- Concurrency & Parallelism: - http://www.bogotobogo.com/cplusplus/multithreaded.php - http://thispointer.com/c-11-multithreading-part-1-three-different-ways-to-create-threads/ Networking: - ASIO:Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. - http://think-async.com/ - https://github.com/chriskohlhoff/asio/ - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3388.pdf: gives a brief, high-level introduction to how Asio may be used in conjunction with C++11. - - Evpp: https://github.com/Qihoo360/evpp - Moduo: https://github.com/chenshuo/muduo - Seastar: For real heavy lifting: https://github.com/scylladb/seastar - CppCMS — C++ Web Framework - http://cppcms.com Docs - http://cppcms.com/wikipp/en/page/cppcms_1x - Reference documentation: http://cppcms.com/cppcms_ref/latest/
Wew!
Ибраги́м
That got viral... so fast
Anonymous
Ибраги́м
I can't believe it
Anonymous
😂😂
Igor🇺🇦
constexpr is NOT a hint, it does more than that. And it's NOT on the same level as inline.
The constexpr specifier thus expresses the possibility to evaluate something at compile time, just like inline expresses possibility of inlining.
Ибраги́м
Ибраги́м
Hence it's more than a possibility most times. Call it a double-guarantee: CT and RT
Anonymous
how can i hack ones fb or whatapp account please
Anonymous
how can i hack ones fb or whatapp account please
First of all, that has almost nothing to do with C++, and this thread isn't a hacking thread.
Pete
https://pastebin.com/Sm0xkK78
Pete
How do I add last names and first names and priority numbers into the array in a main function
Ибраги́м
https://pastebin.com/Sm0xkK78
Suicide! U have more problems than just the array in the main function
Ибраги́м
Tell me what you see
void PatientRecord<ItemType>::setFirstName(ItemType firstName) {   firstName = firstName; /// here, u actually assigning the firstName function parameter to itself. It's a time bomb } U should use a different name in the function parameter list. Like _firstname, don't use the same name as class member
Ибраги́м
Same thing should be done for setPriorityNumber() and the likes
Pete
Same thing should be done for setPriorityNumber() and the likes
The teacher gave out too many assignments. I had just finished one and tried to start on this one, I was getting a bit tired by then and making more basic mistakes
Kelvin
You don't need to do homework if you don't go to school
Kelvin
Ибраги́м
You don't need to do homework if you don't go to school
More like: u should just skip the class the next time u will be having the course. Bad Company
Pete
Pete
Not yet, was going to work on it next. Once I get this part going then everything should be fine
Pete
You don't need to do homework if you don't go to school
He gave out 5 assignments in the past two class sessions, I don’t know what’s going on. Usually it’s just like a main project, a side assignment, and something minor.
Ибраги́м
How do I add last names and first names and priority numbers into the array in a main function
This is should be quite simple, let me see what I can come up with
X. H.
Hello
X. H.
Ya all
X. H.
I 've read
Ибраги́м
@ssnazzy what compiler version are u using? Or better still, do u use C++17 ?
Ибраги́м
Ur code need some face lifting
X. H.
Im using dev c++
X. H.
5.11
X. H.
Version
X. H.
I dont know
X. H.
Im learnin
Pete
@ssnazzy what compiler version are u using? Or better still, do u use C++17 ?
They have us using the visual studio 2017 community edition
Anonymous
turbo c++
X. H.
Will you learn to me too
X. H.
Have u taken any of those books?
X. H.
I dont have a foreign card to pay
X. H.
Im a freshman at uni
Ибраги́м
Not yet, was going to work on it next. Once I get this part going then everything should be fine
I'm currently on mobile, I should come up with sth when I get to the PC
Ибраги́м
They have us using the visual studio 2017 community edition
I doubt if VS will be able to cope with my code. I use latest Clang 5, 6 and GCC 6, 7 8 on Linux.
Ибраги́м
If u want a future with C++, u should also learn how to use these two
Ибраги́м
I'm actually aware of that link years before ur existence. @anunaym14 can sm1 silence this bot, she's becoming unbearable
Pete
I'm currently on mobile, I should come up with sth when I get to the PC
Alright cool, if I don’t reply quickly I had probably fallen asleep since it’s heading toward midnight! Alright in a few weeks I’ll have more free time and will definitely check it out. I’ll screenshot it for the meantime to remember.
Ибраги́м
Lol, it's actually pretty handy some times
Maybe that functionality of You'll have to read and practise 🤷‍♀️ should be manually triggered
Ибраги́м
This deserve a shot in the face
Anonymous
Let me do something
Anonymous
/stop learn
Anonymous
S
Anonymous
Hi
Anonymous
Friends
Anonymous
What news
Anonymous
What news
Golang has new logo
Ибраги́м
/stop learn
Haha, so this is ur outstanding AI trickery?!