MCPcopy Index your code
hub / github.com/Kitware/CMake / cloneUnique

Function cloneUnique

Utilities/cmjsoncpp/src/lib_json/json_value.cpp:52–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50namespace Json {
51template <typename T>
52static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T>& p) {
53 std::unique_ptr<T> r;
54 if (p) {
55 r = std::unique_ptr<T>(new T(*p));
56 }
57 return r;
58}
59
60// This is a walkaround to avoid the static initialization of Value::null.
61// kNull must be word-aligned to avoid crashing on ARM. We use an alignment of

Callers 2

CommentsMethod · 0.85
json_value.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…