mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
eden/fs/service/EdenServiceHandler.cpp: adapt to C++20
Summary: Cast EDEN_MICRO to something fmt::format can handle: char* (from std::basic_string<char8_t>); but that means this is no longer a literal, so cannot concat. Move to its own fmt argument. This avoids the following errors: eden/fs/service/EdenServiceHandler.cpp:227:60: error: invalid operands to binary expression ('basic_ostream<char>' and 'std::basic_string<char8_t>') Differential Revision: D32486517 fbshipit-source-id: c799bdd73be1b46cc938b2076ebc78d0bdb3dded
This commit is contained in:
parent
a41a63955d
commit
1e894f4361
@ -149,7 +149,7 @@ std::string toLogArg(const std::vector<std::string>& args) {
|
||||
|
||||
namespace /* anonymous namespace for helper functions */ {
|
||||
|
||||
#define EDEN_MICRO u8"\u00B5s"
|
||||
#define EDEN_MICRO reinterpret_cast<const char*>(u8"\u00B5s")
|
||||
|
||||
class ThriftFetchContext : public ObjectFetchContext {
|
||||
public:
|
||||
@ -225,9 +225,10 @@ class ThriftLogHelper {
|
||||
// Logging completion time for the request
|
||||
// The line number points to where the object was originally created
|
||||
TLOG(itcLogger_, level_, itcFileName_, itcLineNumber_) << fmt::format(
|
||||
"{}() took {} " EDEN_MICRO,
|
||||
"{}() took {} {}",
|
||||
itcFunctionName_,
|
||||
itcTimer_.elapsed().count());
|
||||
itcTimer_.elapsed().count(),
|
||||
EDEN_MICRO);
|
||||
}
|
||||
|
||||
ThriftFetchContext& getFetchContext() {
|
||||
|
Loading…
Reference in New Issue
Block a user