diff --git a/include/cling/Interpreter/RuntimePrintValue.h b/include/cling/Interpreter/RuntimePrintValue.h index d92c6717..55b7a92d 100644 --- a/include/cling/Interpreter/RuntimePrintValue.h +++ b/include/cling/Interpreter/RuntimePrintValue.h @@ -28,7 +28,7 @@ namespace cling { // Fallback for e.g. vector's bit iterator: template ::value>::type> - std::string printValue(const T& val) { return "{not representable}"; } + inline std::string printValue(const T& val) { return "{not representable}"; } // void pointer std::string printValue(const void **ptr); @@ -92,22 +92,22 @@ namespace cling { std::string toUTF8(const T* const Src, size_t N, const char Prefix = 0); template - std::string printValue(char16_t const (*val)[N]) { + inline std::string printValue(char16_t const (*val)[N]) { return toUTF8(reinterpret_cast(val), N, 'u'); } template - std::string printValue(char32_t const (*val)[N]) { + inline std::string printValue(char32_t const (*val)[N]) { return toUTF8(reinterpret_cast(val), N, 'U'); } template - std::string printValue(wchar_t const (*val)[N]) { + inline std::string printValue(wchar_t const (*val)[N]) { return toUTF8(reinterpret_cast(val), N, 'L'); } template - std::string printValue(char const (*val)[N]) { + inline std::string printValue(char const (*val)[N]) { return toUTF8(reinterpret_cast(val), N, 1); } @@ -124,13 +124,13 @@ namespace cling { // Forward declaration, so recursion of containers possible. template std::string printValue(const T* V, const void* = 0); - template std::string + template inline std::string printValue(const T& V, typename std::enable_if< std::is_pointer::value>::type* = 0) { return printValue(&V); } - template std::string + template inline std::string printValue(const std::pair* V, const void* AsMap = 0) { if (AsMap) return printValue(&V->first) + " => " + printValue(&V->second); @@ -150,7 +150,7 @@ namespace cling { // vector, set, deque etc. template - auto printValue_impl( + inline auto printValue_impl( const CollectionType* obj, typename std::enable_if< std::is_referencebegin()))>::value>::type* = 0) @@ -171,7 +171,7 @@ namespace cling { // As above, but without ability to take address of elements. template - auto printValue_impl( + inline auto printValue_impl( const CollectionType* obj, typename std::enable_if< !std::is_referencebegin()))>::value>::type* = 0) @@ -191,14 +191,14 @@ namespace cling { // Collections template - auto printValue(const CollectionType *obj) + inline auto printValue(const CollectionType *obj) -> decltype(collectionPrinterInternal::printValue_impl(obj), std::string()) { return collectionPrinterInternal::printValue_impl(obj); } // Arrays template - std::string printValue(const T (*obj)[N]) { + inline std::string printValue(const T (*obj)[N]) { if (N == 0) return valuePrinterInternal::kEmptyCollection; @@ -213,7 +213,7 @@ namespace cling { // Tuples template - std::string printValue(std::tuple *); + inline std::string printValue(std::tuple *); namespace collectionPrinterInternal { // We loop at compile time from element 0 to element TUPLE_SIZE - 1 @@ -249,7 +249,7 @@ namespace cling { }; template - std::string tuplePairPrintValue(T *val) + inline std::string tuplePairPrintValue(T *val) { std::string ret("{ "); ret += collectionPrinterInternal::tuplePrinter::print(val); @@ -259,7 +259,7 @@ namespace cling { } template - std::string printValue(std::tuple *val) + inline std::string printValue(std::tuple *val) { using T = std::tuple; if (std::tuple_size::value == 0) @@ -268,7 +268,7 @@ namespace cling { } template - std::string printValue(std::pair *val) + inline std::string printValue(std::pair *val) { using T = std::pair; return collectionPrinterInternal::tuplePairPrintValue(val);