cpp-utilities icon indicating copy to clipboard operation
cpp-utilities copied to clipboard

error: member reference base type 'const char *' is not a structure or union

Open yurivict opened this issue 1 year ago • 2 comments
trafficstars

Version 5.26.0 fails:

/usr/ports/devel/cpp-utilities/work/cpp-utilities-5.26.0/io/nativefilestream.cpp:199:29: error: member reference base type 'const char *' is not a structure or union
  199 |     descriptor = ::open(path.data(), nativeParams.openFlags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
      |                         ~~~~^~~~~
1 error generated.

clang-18 FreeBSD 14.1

yurivict avatar Aug 08 '24 08:08 yurivict

Maybe a libc++ or configuration specific code. Otherwise I fail to see why this can compile anywhere.

I can have a look later but since you can already reproduce it - feel free to create a PR as the fix is probably very simple (get rid of .data()).

Martchus avatar Aug 08 '24 08:08 Martchus

This should be fixed by https://github.com/Martchus/cpp-utilities/commit/e79fcf793e4ff3ab90ec870496349725cd9b76dd but I haven't had the time to test it yet.

Martchus avatar Aug 08 '24 10:08 Martchus

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 12 '24 03:10 stale[bot]

My Android builds (which also use this configuration) work so I guess this can be closed.

Martchus avatar Oct 12 '24 10:10 Martchus