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:
parent
ef1c3d20c6
commit
16aa554c0e
|
@ -47,8 +47,6 @@
|
||||||
namespace partial_range_detail
|
namespace partial_range_detail
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
#define REPORT_FORMAT_STRING "%s:%u: %s %lu past %p end %lu \"%s\""
|
#define REPORT_FORMAT_STRING "%s:%u: %s %lu past %p end %lu \"%s\""
|
||||||
/* Round reporting into large buckets. Code size is more
|
/* Round reporting into large buckets. Code size is more
|
||||||
* important than stack space on a cold path.
|
* 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
|
#if DXX_PARTIAL_RANGE_MINIMIZE_ERROR_TYPE
|
||||||
struct partial_range_error;
|
struct partial_range_error;
|
||||||
#endif
|
#endif
|
||||||
|
@ -194,8 +190,6 @@ struct partial_range_t<I>::partial_range_error
|
||||||
namespace partial_range_detail
|
namespace partial_range_detail
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
template <typename range_exception, std::size_t required_buffer_size>
|
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)
|
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 <
|
template <
|
||||||
#ifdef DXX_HAVE_BUILTIN_OBJECT_SIZE
|
#ifdef DXX_HAVE_BUILTIN_OBJECT_SIZE
|
||||||
std::size_t required_buffer_size,
|
std::size_t required_buffer_size,
|
||||||
|
@ -436,8 +426,6 @@ inline partial_range_t<I> (make_range)(T &t)
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Explicitly block use on rvalue t because returned partial_range_t<I>
|
/* Explicitly block use on rvalue t because returned partial_range_t<I>
|
||||||
* will outlive the rvalue.
|
* will outlive the rvalue.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue