MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / clone

Method clone

include/chaiscript/utility/json.hpp:125–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 struct Internal {
124 template<typename T>
125 auto clone(const std::unique_ptr<T> &ptr) {
126 if (ptr != nullptr) {
127 return std::make_unique<T>(*ptr);
128 } else {
129 return std::unique_ptr<T>(nullptr);
130 }
131 }
132
133 Internal( double d ) : Float( d ), Type(Class::Floating) {}
134 Internal( int64_t l ) : Int( l ), Type(Class::Integral) {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected