From 16aa554c0ef518ff21b0829a7ecc192d605bcb0f Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 4 Sep 2021 12:17:14 +0000 Subject: [PATCH] Remove anonymous namespace in partial_range All the affected symbols are templates, so duplicate instantiations will not cause duplicate definition errors. Removing the anonymous namespace wrapper will allow equivalent definitions from different source files to be folded together, reducing the size of the executable. --- common/include/partial_range.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/common/include/partial_range.h b/common/include/partial_range.h index f37da22a8..c50c04232 100644 --- a/common/include/partial_range.h +++ b/common/include/partial_range.h @@ -47,8 +47,6 @@ namespace partial_range_detail { -namespace { - #define REPORT_FORMAT_STRING "%s:%u: %s %lu past %p end %lu \"%s\"" /* Round reporting into large buckets. Code size is more * important than stack space on a cold path. @@ -85,8 +83,6 @@ inline auto adl_end(T &t) } -} - #if DXX_PARTIAL_RANGE_MINIMIZE_ERROR_TYPE struct partial_range_error; #endif @@ -194,8 +190,6 @@ struct partial_range_t::partial_range_error namespace partial_range_detail { -namespace { - template inline void check_range_bounds(const char *file, unsigned line, const char *estr, const uintptr_t t, const std::size_t index_begin, const std::size_t index_end, const std::size_t d) { @@ -270,10 +264,6 @@ void check_range_object_size(const char *, unsigned, const char *, const P &&, s } -} - -namespace { - template < #ifdef DXX_HAVE_BUILTIN_OBJECT_SIZE std::size_t required_buffer_size, @@ -436,8 +426,6 @@ inline partial_range_t (make_range)(T &t) return t; } -} - /* Explicitly block use on rvalue t because returned partial_range_t * will outlive the rvalue. */