[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] "-Wundefined-func-template" warnings from clang
From: |
Greg Chicares |
Subject: |
[lmi] "-Wundefined-func-template" warnings from clang |
Date: |
Thu, 7 Jul 2022 22:38:48 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
clang-13.0.1-6 gives numerous warnings when this option is enabled.
Here's one example:
In file included from /opt/lmi/src/lmi/custom_io_1.cpp:31:
In file included from /opt/lmi/src/lmi/input.hpp:37:
/opt/lmi/src/lmi/tn_range.hpp:243:5: error: instantiation of function
'tn_range<int, age_trammel<int>>::read' required here, but no definition is
available [-Werror,-Wundefined-func-template]
~tn_range() override = default;
^
/opt/lmi/src/lmi/tn_range.hpp:272:19: note: forward declaration of template
entity is here
std::istream& read (std::istream&) override;
^
/opt/lmi/src/lmi/tn_range.hpp:243:5: note: add an explicit instantiation
declaration to suppress this warning if 'tn_range<int, age_trammel<int>>::read'
is explicitly instantiated in another translation unit
~tn_range() override = default;
^
1 error generated.
The intention was indeed to instantiate some things explicitly in
a single translation unit, in the hope of making compilation more
efficient with 1990's compilers on 1990's hardware.
Is this an actual problem that calls for action?
- [lmi] "-Wundefined-func-template" warnings from clang,
Greg Chicares <=