Re: ODR violation in ranges

2020-03-11 Thread Nathan Sidwell
Cc: libstd...@gcc.gnu.org <mailto:libstdc%2b...@gcc.gnu.org>; GCC Patches > Subject: Re: ODR violation in ranges > > On 11/03/20 06:08 -0400, Nathan Sidwell wrote: >> Jonathan, >> the ranges header contains code like: >>     inli

Re: ODR violation in ranges

2020-03-11 Thread Jason Merrill via Gcc-patches
o (i); } > > compile with -fno-inline and observe '_ZNKUliE_clEi' > > sigh, > > nathan > > > > > > From: Libstdc++ on behalf of Jonathan > Wakely via Libstdc++ > > Sent: Wednesday, March 11, 2020 10:26 > > To: Nathan Sidwell >

Re: ODR violation in ranges

2020-03-11 Thread Nathan Sidwell
#x27;_ZNKUliE_clEi' sigh, nathan From: Libstdc++ on behalf of Jonathan Wakely via Libstdc++ Sent: Wednesday, March 11, 2020 10:26 To: Nathan Sidwell Cc: libstd...@gcc.gnu.org; GCC Patches Subject: Re: ODR violation in ranges On 11/03/20 06:

Re: ODR violation in ranges

2020-03-11 Thread Patrick Palka via Gcc-patches
> From: Libstdc++ on behalf of Jonathan Wakely > via Libstdc++ > Sent: Wednesday, March 11, 2020 10:26 > To: Nathan Sidwell > Cc: libstd...@gcc.gnu.org; GCC Patches > Subject: Re: ODR violation in ranges > > On 11/03/20 06:08 -0400, Nathan Sidwell wrote: > >Jona

Re: ODR violation in ranges

2020-03-11 Thread Jonathan Wakely via Gcc-patches
On 11/03/20 10:56 +, Tam S. B. via Libstdc++ wrote: IIUC using lambda in inline variable initializer is not ODR violation. This is covered in CWG 2300 ( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1510r0.html#2300 ). Ah yes, I think somebody (probably Patrick) has pointed out

Re: ODR violation in ranges

2020-03-11 Thread Jonathan Wakely via Gcc-patches
On 11/03/20 06:08 -0400, Nathan Sidwell wrote: Jonathan, the ranges header contains code like: inline constexpr __adaptor::_RangeAdaptorClosure all = [] (_Range&& __r) { if constexpr (view>) return std::forward<_Range>(__r); else if constexpr (requires { ref_view{std::forward<_Ran

ODR violation in ranges

2020-03-11 Thread Nathan Sidwell
Jonathan, the ranges header contains code like: inline constexpr __adaptor::_RangeAdaptorClosure all = [] (_Range&& __r) { if constexpr (view>) return std::forward<_Range>(__r); else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; }) return ref_view{std::forw