https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122922
Alberto <alberto.gcc.bugzilla at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |14.3.0
--- Comment #3 from Alberto <alberto.gcc.bugzilla at gmail dot com> ---
Reduced a bit more:
// m.hpp
template <typename> struct allocator {
friend void operator==(allocator, allocator) {}
};
struct reverse_iterator operator==(reverse_iterator, reverse_iterator);
struct string {
template <typename T> void foo() { T{} == 0; }
};
// m.cpp
module;
#include "m.hpp"
export module M;
export using ::string;
export using ::allocator;
// a.cpp
export module VF:Tensor;
import M;
template<int r> struct TTensor {
TTensor<r - 1> TensorArr[2];
void Read(string s);
};
template<>
struct TTensor<0> {};
// b.cpp
module;
#include "m.hpp"
export module VF;
export import :Tensor;
void TCara(allocator<TTensor<1>>) {}
export template<int r>
void TCampo() {
TCara(allocator<TTensor<1>>{});
TTensor<r>();
}
// c.cpp
import VF;
int main() {
TCampo<2, 1>();
}
It compiles fine with 14.3 as well.