Skip to content

Commit

Permalink
dylib: fix decorations constructors build failure
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Olivier <[email protected]>
  • Loading branch information
martin-olivier committed Jan 5, 2025
1 parent f2a4b25 commit ef4fb5f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions include/dylib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,21 @@ static_assert(std::is_pointer<native_handle_type>::value, "Expecting HINSTANCE t
static_assert(std::is_pointer<native_symbol_type>::value, "Expecting FARPROC to be a pointer");

struct decorations {
const char *prefix{""};
const char *suffix{""};
const char *prefix;
const char *suffix;

decorations() : prefix(""), suffix("") {}
decorations(const char *prefix, const char *suffix) : prefix(prefix), suffix(suffix) {}

static decorations none() noexcept {
return decorations();
}

static decorations os_default() noexcept {
return decorations {
return decorations(
DYLIB_WIN_OTHER("", "lib"),
DYLIB_WIN_MAC_OTHER(".dll", ".dylib", ".so"),
};
DYLIB_WIN_MAC_OTHER(".dll", ".dylib", ".so")
);
}

std::string decorate(const std::string &lib_name) const {
Expand Down

0 comments on commit ef4fb5f

Please sign in to comment.