Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMT_STATIC_THOUSANDS_SEPARATOR doesn't compile with GCC #1011

Closed
alabuzhev opened this issue Jan 18, 2019 · 1 comment
Closed

FMT_STATIC_THOUSANDS_SEPARATOR doesn't compile with GCC #1011

alabuzhev opened this issue Jan 18, 2019 · 1 comment

Comments

@alabuzhev
Copy link
Contributor

#define FMT_STATIC_THOUSANDS_SEPARATOR <something>

Compilation error:

format.cc: In instantiation of 'fmt::v5::internal::locale_ref::locale_ref(const Locale&) [with Locale = std::locale]':
format.cc:12:73:   required from here
format.cc:12:73: error: explicit instantiation of 'fmt::v5::internal::locale_ref::locale_ref(const Locale&) [with Locale = std::locale]' but no definition available [-fpermissive]
 template FMT_API internal::locale_ref::locale_ref(const std::locale& loc);
                                                                         ^
format.cc: In instantiation of 'Locale fmt::v5::internal::locale_ref::get() const [with Locale = std::locale]':
format.cc:13:71:   required from here
format.cc:13:71: error: explicit instantiation of 'Locale fmt::v5::internal::locale_ref::get() const [with Locale = std::locale]' but no definition available [-fpermissive]
 template FMT_API std::locale internal::locale_ref::get<std::locale>() const;
                                                                       ^~~~~

Possible fix for format.cc:

FMT_BEGIN_NAMESPACE
template struct internal::basic_data<void>;
+ #if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
template FMT_API internal::locale_ref::locale_ref(const std::locale& loc);
template FMT_API std::locale internal::locale_ref::get<std::locale>() const;
+ #endif
@vitaut
Copy link
Contributor

vitaut commented Jan 19, 2019

Fixed in fdd8e33, thanks for reporting.

@vitaut vitaut closed this as completed Jan 19, 2019
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

No branches or pull requests

2 participants