¡@

Home 

c++ Programming Glossary: utility

What is std::promise?

http://stackoverflow.com/questions/11004273/what-is-stdpromise

the state ready. std async is a higher level convenience utility that gives you an asynchronous result object and internally..

Why is volatile not considered useful in multithreaded C or C++ programming?

http://stackoverflow.com/questions/2484980/why-is-volatile-not-considered-useful-in-multithreaded-c-or-c-programming

answer I recently posted I seem to be confused about the utility or lack thereof of volatile in multi threaded programming contexts...

Which C++ Standard Library wrapper functions do you use?

http://stackoverflow.com/questions/2552839/which-c-standard-library-wrapper-functions-do-you-use

the gaps with wrapper functions. For example my own utility library has this function for vector append template class T..

What is the point of function pointers?

http://stackoverflow.com/questions/2592137/what-is-the-point-of-function-pointers

the point of function pointers I have trouble seeing the utility of function pointers. I guess it may be useful in some cases..

Can I use a binary literal in C or C++?

http://stackoverflow.com/questions/2611764/can-i-use-a-binary-literal-in-c-or-c

bitset . Thank you Roger for the bitset tip #include boost utility binary.hpp #include stdio.h #include stdlib.h #include bitset..

What are the pitfalls of ADL?

http://stackoverflow.com/questions/2958648/what-are-the-pitfalls-of-adl

dependent lookup. Consider for example the following utility #include iostream namespace utility template typename T void.. example the following utility #include iostream namespace utility template typename T void print T x std cout x std endl template.. and prints it four times int main my_stuff unicorn x utility print_n x 4 You compile this program run it and... it crashes...

Advantages of using forward

http://stackoverflow.com/questions/3582001/advantages-of-using-forward

T is cryptic and weird to remember let's instead make a utility function called forward which does the same thing std forward..

What techniques can be used to speed up C++ compilation times?

http://stackoverflow.com/questions/373142/what-techniques-can-be-used-to-speed-up-c-compilation-times

headers and other library include files. ccache is another utility that takes advantage of caching techniques to speed things up...

C/C++: switch for non-integers

http://stackoverflow.com/questions/4165131/c-c-switch-for-non-integers

list make things much prettier no macros involved #include utility #include algorithm #include initializer_list template typename..

How many and which are the uses of “const” in C++?

http://stackoverflow.com/questions/455518/how-many-and-which-are-the-uses-of-const-in-c

T t This trick is used in Alexandrescu's ScopeGuard utility class. Once the temporary goes out of scope the destructor of..

Pretty-print C++ STL containers

http://stackoverflow.com/questions/4850473/pretty-print-c-stl-containers

#include type_traits #include iostream #include utility #include tuple namespace std Pre declarations of container types.. map #include set #include array #include tuple #include utility #include string #include prettyprint.h Specialization for a..

How to emulate C array initialization “int arr[] = { e1, e2, e3, … }” behaviour with std::array?

http://stackoverflow.com/questions/6114067/how-to-emulate-c-array-initialization-int-arr-e1-e2-e3-behaviou

various answers looks like this #include array #include utility template class T class... Tail std array T 1 sizeof... Tail..

What breaking changes are introduced in C++11?

http://stackoverflow.com/questions/6399615/what-breaking-changes-are-introduced-in-c11

swap to be in algorithm may have to instead include utility The global namespace posix is now reserved for standardization...

How to get memory usage at run time in c++?

http://stackoverflow.com/questions/669438/how-to-get-memory-usage-at-run-time-in-c

an ioctl solution. For our applications we coded a general utility routine based on reading files in proc pid . There are a number..

Why is reading lines from stdin much slower in C++ than Python?

http://stackoverflow.com/questions/9371238/why-is-reading-lines-from-stdin-much-slower-in-c-than-python

and the fgets approaches as well as comparing with the wc utility. The scanf version segfaulted and I don't feel like troubleshooting.. by J.F. Sebastian in the comments below the GNU wc utility uses plain C read within the safe read.c wrapper to read chunks.. is quite fast though still a bit slower than the raw c wc utility of course usr bin time cat temp_big_file readline_test3.py 0.01user..