http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58196
Bug ID: 58196 Summary: std::align is missing Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: augustorighetto at gmail dot com g++ 4.8.1 can't find std::align in <memory>. ---- $ g++ --version g++ (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ---- #include <cstdlib> #include <iostream> #include <memory> int main(int argc, char* argv[]) { float* f = nullptr; size_t space = 10; if (std::align(2, sizeof(float), f, space)) { std::cout << "yes" << std::endl; } else { std::cout << "no" << std::endl; } return EXIT_SUCCESS; } ---- $ g++ -o foo -std=c++11 Main.cpp Main.cpp: In function ‘int main(int, char**)’: Main.cpp:8:9: error: ‘align’ is not a member of ‘std’ if (std::align(2, sizeof(float), f, space)) { ^