Missing <cstddef> (fails to compile with -D_GLIBCXX_DEBUG turned off). Better yet, using #include <bits/stdc++.h>.