ut icon indicating copy to clipboard operation
ut copied to clipboard

Testing code doesn't compile with "constructor priorities are not supported"

Open npalladium opened this issue 7 months ago • 1 comments

With the ut header file from master and the following example:

#include "ut.hpp"

int main(int argc, char* argv[]) {
    boost::ut::expect(true);
    return 0;
}

I get the following error when I compile with /opt/homebrew/bin/g++-15 -std=c++23 minimal.cpp:

In file included from minimal.cpp:1:
ut.hpp:3365:33: error: constructor priorities are not supported
 3365 |     int argc, const char* argv[]) {
      |                                 ^

Compiler version: g++-15 (Homebrew GCC 15.1.0) 15.1.0 OS details: Darwin Kernel Version 22.6.0

ut seems to work fine after feleting the lines of code which trigger this issue.

npalladium avatar Jun 04 '25 11:06 npalladium

Yeah it's just __attribute__((constructor(101))) that needs to be removed.

helmesjo avatar Sep 20 '25 18:09 helmesjo