Skip to content
Snippets Groups Projects
  1. Dec 03, 2024
  2. Nov 29, 2024
  3. Nov 28, 2024
  4. Nov 26, 2024
  5. Nov 25, 2024
  6. Nov 22, 2024
    • Carsten Gräser's avatar
      Merge branch 'bugfix/fix-greedy-streamoperators' into 'master' · 56b4aa26
      Carsten Gräser authored
      [bugfix] Don't implent operator<< templated wrt the stream
      
      See merge request !1476
      56b4aa26
    • Carsten Gräser's avatar
      [bugfix] Don't provide operator<< templated for the stream · dd5cc8be
      Carsten Gräser authored
      When implementing `operator<<(S& , const T&)` to provide character
      stream support for a custom type `T`, the overload should be specific
      to `S=std::ostream` and not be templated wrt `S`. Otherwise this may
      lead to ambiguous overloads downstream.
      To give two examples for problematic cases:
      
      Here we defined an overload
      ```cpp
      template<class Stream, class T, std::size_t N>
      inline Stream& operator<<(Stream&, const std::array<T,N>&)
      ```
      If a downstream module wants to defines an overload
      ```cpp
      template<class A>
      inline std::ostream& operator<<(std::ostream&, const A&)
      ```
      for a custom type `A` derived from `std::array<T,N>`,
      this leads to ambiguity.
      
      If a custom class `S` that does not represent a character stream
      wants to use the `s << t` syntax in anoter context, this cannot
      be done for cases where `t` is an `std::array`. Furtermore
      the overload that we provide here may in general not make any
      sense in this context.
      
      BTW: One may argue that defining overloads for `std::` types
      is in general a very bad idea. Imagine that another library
      does the same - then we cannot use it together with dune, because
      both claim to be the authority over `std::`.
      dd5cc8be
  7. Nov 19, 2024
  8. Nov 16, 2024
  9. Nov 15, 2024
  10. Nov 11, 2024
  11. Nov 10, 2024
  12. Nov 07, 2024
  13. Nov 06, 2024
  14. Nov 05, 2024
  15. Nov 04, 2024
  16. Nov 01, 2024
  17. Oct 29, 2024
  18. Oct 26, 2024
Loading