Skip to content

Conversation

@autoantwort
Copy link

Otherwise it is impossible to export types that depend on the strong_type since some of the used templated values are link lokal. Error message from gcc:

out/build/x64-debug-linux/vcpkg_installed/x64-linux/include/strong_type/type.hpp:235:23: note: 'template<class ...> constexpr const bool strong::impl::always_false< <template-parameter-1-1>...>' declared with internal linkage
  235 | static constexpr bool always_false = false;
      |                       ^~~~~~~~~~~~

for something like

module;

#include <strong_type/strong_type.hpp>

export module test;

import std;

using myint = strong::type<int, struct my_int_>;

with gcc 15.2

Otherwise it is impossible to export types that depend on the strong_type since some of the used
templated values are link lokal. Error message from gcc:
out/build/x64-debug-linux/vcpkg_installed/x64-linux/include/strong_type/type.hpp:235:23: note: 'template<class ...> constexpr const bool strong::impl::always_false< <template-parameter-1-1>...>' declared with internal linkage
  235 | static constexpr bool always_false = false;
      |                       ^~~~~~~~~~~~

for something like
```c++
module;

#include <strong_type/strong_type.hpp>

export module test;

import std;

using myint = strong::type<int, struct my_int_>;
```
with gcc 15.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant