/*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
*/
-#ifndef FOLLY_BASE_CONV_H_
-#define FOLLY_BASE_CONV_H_
+#pragma once
#include <folly/FBString.h>
#include <folly/Likely.h>
::folly::detail::toAppendStrImpl(vs...);
}
+#ifdef _MSC_VER
+// Special case pid_t on MSVC, because it's a void* rather than an
+// integral type. We can't do a global special case because this is already
+// dangerous enough (as most pointers will implicitly convert to a void*)
+// just doing it for MSVC.
+template <class Tgt>
+void toAppend(const pid_t a, Tgt* res) {
+ toAppend(uint64_t(a), res);
+}
+#endif
+
/**
* Special version of the call that preallocates exaclty as much memory
* as need for arguments to be stored in target. This means we are
#undef FOLLY_RANGE_CHECK_STRINGIZE
#undef FOLLY_RANGE_CHECK_STRINGIZE2
#endif
-
-#endif /* FOLLY_BASE_CONV_H_ */