(2) now shows a proper error, as shown below.

Please could you report the other issues upstream?


foo.cc: In substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, con
st Type&) [with Type = FMT]’:
foo.cc:11:13:   required by substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<
(CSVTabIns&, const Type&) [with Type = FMT]’
foo.cc:46:22:   required from here
foo.cc:8:9:   required for the satisfaction of ‘OstreamInsertable<Type>’ [with
Type = FMT]
foo.cc:9:5:   in requirements with ‘std::ostream& out’, ‘Type value’ [with Type
= FMT]
foo.cc:9:5: error: satisfaction of atomic constraint ‘requires(std::ostream&
out, Type value) {out << value;} [with
Type = Type]’ depends on itself
    9 |     requires(std::ostream &out, Type value)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   10 |     {
      |     ~
   11 |         out << value;
      |         ~~~~~~~~~~~~~
   12 |     };
      |     ~
foo.cc: In function ‘void operator<<(CSVTabIns&, FMT::FMTHline)’:
foo.cc:46:9: error: no match for ‘operator<<’ (operand types are ‘CSVTabIns’ and
‘FMT’)
   46 |     tab << (*hline)(1);      // insert hline in the next column
      |     ~~~ ^~ ~~~~~~~~~~~
      |     |              |
      |     CSVTabIns      FMT
foo.cc:40:13: note: candidate: ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, const Type&)’
   40 | inline void operator<<(CSVTabIns &&tab, Type const &value)
      |             ^~~~~~~~
foo.cc:40:13: note:   template argument deduction/substitution failed:
foo.cc:40:13: note: constraints not satisfied
foo.cc: In substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, const Type&) [with Type =
FMT]’:
foo.cc:11:13:   required by substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, const Type&) [with Type = 
FMT]’
foo.cc:46:22:   required from here
foo.cc:8:9:   required for the satisfaction of ‘OstreamInsertable<Type>’ [with
Type = FMT]
foo.cc:9:5:   in requirements with ‘std::ostream& out’, ‘Type value’ [with Type
= FMT]
foo.cc:8:9:   required for the satisfaction of ‘OstreamInsertable<Type>’ [with
Type = FMT]
foo.cc:9:5:   in requirements with ‘std::ostream& out’, ‘Type value’ [with Type
= FMT]
foo.cc:9:5: error: satisfaction of atomic constraint ‘requires(std::ostream&
out, Type value) {out << value;} [with Type = Type]’ depends on itself
    9 |     requires(std::ostream &out, Type value)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   10 |     {
      |     ~
   11 |         out << value;
      |         ~~~~~~~~~~~~~
   12 |     };
      |     ~
foo.cc: In substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, const Type&) [with Type =
FMT]’:
foo.cc:11:13:   required by substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, const Type&) [with Type = 
FMT]’
foo.cc:46:22:   required from here
foo.cc:8:9:   required for the satisfaction of ‘OstreamInsertable<Type>’ [with
Type = FMT]
foo.cc:9:5:   in requirements with ‘std::ostream& out’, ‘Type value’ [with Type
= FMT]
foo.cc:9:5: error: satisfaction of atomic constraint ‘requires(std::ostream&
out, Type value) {out << value;} [with Type = Type]’ depends on itself
foo.cc: In substitution of ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&&, const Type&) [with Type =
FMT]’:
foo.cc:46:22:   required from here
foo.cc:11:13: note: the required expression ‘(out << value)’ is invalid
   11 |         out << value;
      |         ~~~~^~~~~~~~
cc1plus: note: set ‘-fconcepts-diagnostics-depth=’ to at least 2 for more detail
foo.cc:30:17: note: candidate: ‘template<class Type>  requires
OstreamInsertable<Type> void operator<<(CSVTabIns&, const Type&)’
   30 |     friend void operator<<(CSVTabIns &tab, Type const &value);
      |                 ^~~~~~~~
foo.cc:30:17: note:   substitution of deduced template arguments resulted in
errors seen above
foo.cc:43:13: note: candidate: ‘void operator<<(CSVTabIns&, FMT::FMTHline)’
   43 | inline void operator<<(CSVTabIns &tab, FMT::FMTHline hline)
      |             ^~~~~~~~
foo.cc:43:54: note:   no known conversion for argument 2 from ‘FMT’ to
‘FMT::FMTHline’ {aka ‘FMT (*)(unsigned int)’}
   43 | inline void operator<<(CSVTabIns &tab, FMT::FMTHline hline)
      |                                        ~~~~~~~~~~~~~~^~~~~

Reply via email to