id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11670,Boost intrusive constructors should be constexpr,ben.maurer@…,Ion Gaztañaga,"Boost intrusive constructors should be marked constexpr. Doing so would allow for their use in static variables without SIOF. As an example consider this program that uses a simple linked list http://ideone.com/O5YWM8 because the LinkedList constructor is not constexpr, the variable gets initialized in file declaration order -- after my_crazy_variable. Therefore even though my_crazy_variable's ctor pushes something on to the list, it gets lost when the list is initialized and the program crashes due to being unable to pop a value. However, if you declare LinkedList's constructor constexpr the list is initialized in the zero initialization phase (http://en.cppreference.com/w/cpp/language/initialization#Non-local_variables). This means that the linked list can be used in other constructors without worrying about initialization order. While my example is obviously not a sane use case, imagine a linked list that registers all live Widget objects. if somebody creates a widget during static initialization they could encounter the same problem. A side benefit to doing this is that code size is reduced as the code to initialize the linked list is not created",Bugs,new,To Be Determined,intrusive,Boost 1.60.0,Problem,,,