bgs99 / podrm

Experimental ORM based on Boost.PFR
Mozilla Public License 2.0
0 stars 1 forks source link

Cannot build on libcxx #11

Open bugdea1er opened 4 months ago

bugdea1er commented 4 months ago

Tested both on Apple LLVM and LLVM:

std::span cannot be used on incomplete types

https://github.com/bgs99/pfr-orm/blob/12d7861f14834aaf2e83be09c839db497e6b9ef9/include/pfr-orm/definitions.hpp#L32

In file included from /Users/bugdealer/Developer/pfr-orm/lib/postgres/operations.cpp:5:
In file included from /Users/bugdealer/Developer/pfr-orm/include/pfr-orm/definitions.hpp:5:
In file included from /Users/bugdealer/Developer/pfr-orm/include/pfr-orm/detail/span.hpp:7:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/span:541:32: error: arithmetic on a pointer to an incomplete type 'const pfrorm::FieldDescription'
        return iterator(data() + size());
                        ~~~~~~ ^
bgs99 commented 4 months ago

Please note that you may use -DPFR_ORM_USE_GSL_SPAN=ON as a workaround until the issue is resolved

bgs99 commented 4 months ago

https://github.com/llvm/llvm-project/issues/59966

bgs99 commented 4 months ago

Seems like the solution for now is defining all of the special members manually after the class definition