Re: Make safe_iterator inline friends

2018-08-31 Thread Jonathan Wakely
On 30/08/18 21:56 +0200, François Dumont wrote: --- a/libstdc++-v3/include/debug/safe_iterator.h +++ b/libstdc++-v3/include/debug/safe_iterator.h @@ -36,6 +36,28 @@ #include #include +#define _GLIBCXX_DEBUG_VERIFY_OPERANDS(_Lhs, _Rhs, _BadMsgId, _DiffMsgId) \ + _GLIBCXX_DEBUG_VERIFY(!_Lhs._M_

Re: Make safe_iterator inline friends

2018-08-30 Thread François Dumont
Thanks for all those explanations. It helped me to find the solution. So here is the final patch with all operators inline friends. Tested under Linux x86_64.     * include/debug/safe_iterator.h     (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>::_Self):     New.     (_Safe_iterato

Re: Make safe_iterator inline friends

2018-08-29 Thread Jonathan Wakely
On 29/08/18 07:54 +0200, François Dumont wrote: On 28/08/2018 21:04, Jonathan Wakely wrote: On 23/08/18 22:59 +0200, François Dumont wrote: On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because

Re: Make safe_iterator inline friends

2018-08-28 Thread François Dumont
On 28/08/2018 21:04, Jonathan Wakely wrote: On 23/08/18 22:59 +0200, François Dumont wrote: On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because all my attempts to make them inline friends fail

Re: Make safe_iterator inline friends

2018-08-28 Thread François Dumont
On 28/08/2018 21:04, Jonathan Wakely wrote: On 23/08/18 22:59 +0200, François Dumont wrote: On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because all my attempts to make them inline friends fail

Re: Make safe_iterator inline friends

2018-08-28 Thread Jonathan Wakely
On 23/08/18 22:59 +0200, François Dumont wrote: On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because all my attempts to make them inline friends failed. I understand that an inline friend withi

Re: Make safe_iterator inline friends

2018-08-23 Thread François Dumont
On 22/08/2018 23:45, Jonathan Wakely wrote: On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because all my attempts to make them inline friends failed. I understand that an inline friend within a base class is not a very clean design. Comp

Re: Make safe_iterator inline friends

2018-08-22 Thread Jonathan Wakely
On 22/08/18 23:08 +0200, François Dumont wrote: Only operator== and != remains outside _Safe_iterator because all my attempts to make them inline friends failed. I understand that an inline friend within a base class is not a very clean design. Compiler error was: /home/fdt/dev/gcc/build/x86_