On Friday, March 11, 2016 12:30 PM, Bjorn Reese
wrote: On 03/11/2016 01:50 AM, Paul Fultz II wrote:
library. I do, however, need to discuss some of the misperceived issues with using global function objects in the documentation. As the issues raised in the review were:
The destruction order of global objects in different translation units is undefined. This means that I cannot use a global fit function in the destructor of one of my own global objects because the former may have
been destroyed before the latter.
This is not a problem, because it is initialized at compile-time, that means
it is a literal type:
http://en.cppreference.com/w/cpp/concept/LiteralType
So besides the constructor not having side-effects, the destructor must be
trivial, as well. For example, this cannot compile:
struct foo_fn
{
template