fd: avoid move-to-self

When compiling with C++23, GCC-13 raises the following compiler failure:
```
../test/internal/fd.cpp:182:8: error: moving ‘fd’ of type ‘gpioplus::internal::Fd’ to itself [-Werror=self-move]
```

Switch to an explicit `static_cast` to test the same functionality but
avoid the error.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I81e36b05d51fd8b11b1e99d62426dd516c3676ed
1 file changed
tree: 269c9ed7a58019cfb6ec23dfafac8743bf47ed2b
  1. example/
  2. src/
  3. subprojects/
  4. test/
  5. .clang-format
  6. .gitignore
  7. .lcovrc
  8. LICENSE
  9. meson.build
  10. meson_options.txt
  11. OWNERS
  12. README.md
README.md

gpioplus

gpioplus is a c++ wrapper around the linux gpio ioctl interface. It aims to provide c++ ergonomics to the usage.

Building

For a standard release build, you want something like:

meson setup -Dexamples=false -Dtests=disabled builddir
ninja -C builddir
ninja -C builddir install

For a test / debug build, a typical configuration is

meson setup -Dtests=enabled builddir
meson test -C builddir