Skip to content

Instantly share code, notes, and snippets.

@danlark1

danlark1/pair_init.h

Created Apr 13, 2020
Embed
What would you like to do?
constexpr std::pair<int, int> t;
static_assert(t.first == 0 && t.second == 0);
std::array<int, 5> arr;
// assert(arr[0] == 0); // Undefined behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.