Skip to content

Commit 2189c3a

Browse files
committed
doctest: Do not use unnamed class
When compiling with clang this results in emitting absolute path into debug info, especially .debug_str section has ~(unnamed class at /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/git/unittests/doctest.h:6428:5) (unnamed class at /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/git/unittests/doctest.h:6428:5) Therefore use a name for the class instead and help get rid of this absolute path in debug info. This fixes File /usr/lib/libcereal/ptest/tests/.debug/test_unordered_map in package libcereal-dbg contains reference to TMPDIR Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent ddd4672 commit 2189c3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unittests/doctest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6424,7 +6424,7 @@ void Context::setCout(std::ostream* out) { p->cout = out; }
64246424
static class DiscardOStream : public std::ostream
64256425
{
64266426
private:
6427-
class : public std::streambuf
6427+
class discardBufStream: public std::streambuf
64286428
{
64296429
private:
64306430
// allowing some buffering decreases the amount of calls to overflow

0 commit comments

Comments
 (0)