martinmoene / expected-lite

expected lite - Expected objects in C++11 and later in a single-file header-only library
Boost Software License 1.0
389 stars 35 forks source link

Multiple definition of detail::text when compiled with no exceptions #37

Closed jorticus closed 4 years ago

jorticus commented 4 years ago

When compiling this library with no exceptions, the linker fails with the following:

multiple definition of `nonstd::expected_lite::detail::text(char const*)'

It appears the following function is the cause... Suggested fix - make the function static:

namespace detail {
    static bool text( char const * /*text*/ ) { return true; }
}