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.
This commit is contained in:
Kp 2021-09-04 12:17:14 +00:00
parent ef1c3d20c6
commit 16aa554c0e

View file

@ -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<I>::partial_range_error
namespace partial_range_detail
{
namespace {
template <typename range_exception, std::size_t required_buffer_size>
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<I> (make_range)(T &t)
return t;
}
}
/* Explicitly block use on rvalue t because returned partial_range_t<I>
* will outlive the rvalue.
*/