Skip to main content

Questions tagged [standard-library]

2 votes
1 answer
227 views

For context, I'm trying to make a span type that has a size type parameter, which mimics much of the std::span api. std::dynamic_extent is not zero in C++, instead being defined as -1ull or std::...
Krupip's user avatar
  • 1,347
0 votes
2 answers
361 views

I'm using argparse.ArgumentParser extensively; however, it comes with a lot of boilerplate to set up, and this is especially noticeable when you've got more than a few common arguments that probably ...
g_elef's user avatar
  • 19
-1 votes
2 answers
585 views

Based on the data structure of the AVL tree, I implemented a memory manager that does the best matching according to the size. I originally thought that the speed would be fast and the length of the ...
CukiPid's user avatar
  • 11
6 votes
5 answers
3k views

C standard library has strncpy function, declared as: char *strncpy(char *dest, const char *src, size_t n); It's a strange beast, as it fills n bytes of memory pointed to by dest. It does this by ...
hyde's user avatar
  • 3,764
-3 votes
2 answers
2k views

Java collection streams were introduced in Java 8, which came out in March of 2014. By that time, we already had well-established mechanisms for manipulating collections in several other languages, ...
Mike Nakis's user avatar
  • 32.8k
2 votes
1 answer
306 views

Why did c++11 add a separate find_if() instead of simply overloading the existing find()? Wouldn't overloading the function be sufficient?
Jankovsky144's user avatar
0 votes
1 answer
251 views

I am trying to come up with a solution to replace joda-time with java 8 time in our product. The code-base encompasses many projects of which some import joda-time directly and some transitively. To ...
Kratt's user avatar
  • 11
32 votes
10 answers
9k views

I was thinking why are there (in all programming languages I have learned, such as C++, Java, Python) standard libraries like stdlib, instead of having similar "functions" being a primitive of the ...
user avatar
2 votes
1 answer
4k views

Simplified question with a working example: I want to reuse a std::unordered_map (let's call it umap) multiple times, similar to the following dummy code (which does not do anything meaningful). How ...
Abaris's user avatar
  • 31
2 votes
2 answers
6k views

I am not sure why there are so many header file for the C standard library (stdio.h, stdlib.h, math.h). How do these header files point to the same library? I guess I am a little bit confused about ...
yoyo_fun's user avatar
  • 2,297
3 votes
2 answers
341 views

While trying to debug a weird issue where I knew an exception should have been thrown but was not, I found the following in the Java standard library's java.lang.ClassLoader class: /** * Open for ...
Ellie Harper's user avatar
3 votes
1 answer
2k views

I fail to infer the exact point of historical introduction of STL into actual C++ standard library from the wikipedia article: https://en.wikipedia.org/wiki/Standard_Template_Library It appears to me ...
Loves Probability's user avatar
3 votes
4 answers
878 views

In C, almost everything requires a function. What nags me is that I don't know exactly what's going on. If there was no msvcrt.dll file, my C programs would all break because that's where all the ...
Garhoogin's user avatar
-1 votes
1 answer
684 views

I have built a library that is being used by a few people. They say that library has a few print statements which is wrong because a library should give freedom to users to use the library the way ...
Gaurav Kumar's user avatar
8 votes
3 answers
10k views

I was looking at Map and SortedMap documentation from Java 7 and I have realized that SortedMap, which extends Map overrides entrySet(), keySet() and values(). AFAIK, interfaces cannot implement a ...
Utku's user avatar
  • 1,912

15 30 50 per page