Files
filesystem/config/has_attribute_init_priority.cpp
Andrey Semashev 9e5a3e231e Added a configure check for init_priority attribute.
Apparently, gcc does not support the attribute on Mac OS 11.4. Since
we can't tell if other systems aren't supported as well, it's better
to check with a configure check. As a side effect, this might add
support for more compilers.

Closes https://github.com/boostorg/filesystem/issues/199.
2021-07-14 18:12:47 +03:00

21 lines
375 B
C++

// Copyright 2021 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/filesystem
struct global_class
{
global_class() {}
~global_class() {}
};
__attribute__ ((init_priority(32767)))
global_class g_object;
int main()
{
return 0;
}