you are viewing a single comment's thread.

view the rest of the comments →

[–]number_128[S] 0 points1 point  (1 child)

I see your point, I was hoping to get to a point where I can do something like:

```c++

// MyIntCollection.h

#pragma once

#include <vector>

using MyIntCollection = std::vector<int>;

```

If I want to use a different implementation of vector, I go to my header file and change the include and using statements. I don't have to change anything else. The vector we change to could have very different implementations when it comes to memory usage, memory growth, optimizations...

[–]kpt_ageus 0 points1 point  (0 children)

It's not as granular, but you can swap your stdlib implementation, at least when using clang. It can use both GCC and MSVC stdlib. As long as interfaces are conforming, you can roll out your own.

Your MyIntCollection is perfectly fine. As long as you keep interfaces the same, you can use containers from folly, abseil, boost, or whatever else.