]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/ceph_time: move operator<<(ostream&, timespan&) into std namespace
authorKefu Chai <kchai@redhat.com>
Thu, 7 Jan 2021 07:17:45 +0000 (15:17 +0800)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 11 May 2022 16:26:00 +0000 (12:26 -0400)
commit8543e24f1c681627e3670ec884aa41efa319c3c1
tree4858cd27338438914e07ad4ce478b2042b572633
parentcf96c6f8260482cb47f43f87ae9268b434e9df97
common/ceph_time: move operator<<(ostream&, timespan&) into std namespace

otherwise compiler is not able to find it as the "timespan" here is
actually a class defined in std namespace, even it has an alias defined
in ceph namespace like:

typedef std::chrono::duration<rep, std::nano> timespan;

but this does not make it a member of "ceph" namespace. for more details
on the lookup rules, see https://en.cppreference.com/w/cpp/language/adl

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 75aafcba888a5753d2a4a8378637b4bb9fad5dd0)
src/common/ceph_time.cc
src/common/ceph_time.h