On Fri, Sep 29, 2023 at 11:00:01AM +0100, Jonathan Wakely wrote: > > +/* Destruct N elements in DST. */ > > + > > +template <typename T> > > +inline void > > +vec_destruct (T *dst, unsigned n) > > +{ > > + for ( ; n; ++dst, --n) > > + dst->~T (); > > +} > > + > > /* Control data for vectors. This contains the number of allocated > > and used slots inside a vector. */ > > > > @@ -310,6 +338,9 @@ va_heap::release (vec<T, va_heap, vl_emb > > if (v == NULL) > > return; > > > > + if (!std::is_trivially_destructible <T>::value) > > Do GCC's coding standards really require a space before the template > argument list, like for a function parameter list? > That style doesn't seem to be used elsewhere (and is not idiomatic for > C++ at all).
Seems it is mixed, in gcc/ subdirectory: grep ' <[a-zA-Z]' *.h *.cc */*.h */*.cc | grep -v '#.*include' | wc -l 7143 grep '[^ ]<[a-zA-Z]' *.h *.cc */*.h */*.cc | grep -v '#.*include' | wc -l 13579 > > + template<typename T, typename U> > > + struct is_trivially_copyable_or_pair<std::pair<T, U> > > > The space in "> >" is only required in C++98, we don't need it in C++11. I know, I was just following what code around used as well. Though admittedly that is from the days where we needed C++98 compatibility. Jakub