Skip to content

Fix gcc compilation error#25

Merged
Wentzell merged 1 commit into
TRIQS:unstablefrom
Thoemi09:FIX_FMT_ERROR
Mar 5, 2026
Merged

Fix gcc compilation error#25
Wentzell merged 1 commit into
TRIQS:unstablefrom
Thoemi09:FIX_FMT_ERROR

Conversation

@Thoemi09
Copy link
Copy Markdown
Contributor

@Thoemi09 Thoemi09 commented Mar 4, 2026

gcc complains about the specialized fmt::formatter for nda::MemoryArray types:

#11 22.62 /source/ctseg/c++/triqs_ctseg/logs.hpp:28:43: error: declaration of 'struct fmt::v12::formatter<T>' ambiguates earlier template instantiation for 'struct fmt::v12::formatter<nda::basic_array<double, 1, nda::C_layout, 'V', nda::heap_basic<nda::mem::mallocator<> > >, char, void>' [-fpermissive]
#11 22.62    28 | template <nda::MemoryArray A> struct fmt::formatter<A> : ostream_formatter {};
#11 22.62       |                                           ^~~~~~~~~~~~

Since we are already using fmt::streamed (see 12f816c), I don't think we actually need the formatter. Removing it should be fine and should fix the compilation error.

@Wentzell Wentzell self-requested a review March 5, 2026 14:48
Copy link
Copy Markdown
Member

@Wentzell Wentzell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Thoemi09 for this fix

@Wentzell Wentzell merged commit b4bc6f0 into TRIQS:unstable Mar 5, 2026
3 of 5 checks passed
@Thoemi09 Thoemi09 deleted the FIX_FMT_ERROR branch March 5, 2026 15:47
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.

2 participants