Compiling <functional> in C++17 or higher mode results in:
functional:2500:1: warning: attribute '__visibility__' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes] _LIBCPP_TYPE_VIS ^ __config:701:46: note: expanded from macro '_LIBCPP_TYPE_VIS' # define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default"))) ^ 1 warning generated.
Fix it by putting the attribute after the class keyword.