diff --git a/include/assimp/Exceptional.h b/include/assimp/Exceptional.h index e753a8ba1..ec3d38c5a 100644 --- a/include/assimp/Exceptional.h +++ b/include/assimp/Exceptional.h @@ -98,10 +98,6 @@ public: DeadlyErrorBase(Assimp::Formatter::format(), std::forward(args)...) { // empty } - -#if defined(_MSC_VER) && defined(__clang__) - DeadlyImportError(DeadlyImportError& other) = delete; -#endif }; // --------------------------------------------------------------------------- @@ -114,10 +110,6 @@ public: template explicit DeadlyExportError(T&&... args) : DeadlyErrorBase(Assimp::Formatter::format(), std::forward(args)...) {} - -#if defined(_MSC_VER) && defined(__clang__) - DeadlyExportError(DeadlyExportError& other) = delete; -#endif }; #ifdef _MSC_VER diff --git a/include/assimp/TinyFormatter.h b/include/assimp/TinyFormatter.h index 6356bbae6..df2a32eca 100644 --- a/include/assimp/TinyFormatter.h +++ b/include/assimp/TinyFormatter.h @@ -119,29 +119,41 @@ public: * work for const references, so many function prototypes will * include const basic_formatter& s but might still want to * modify the formatted string without the need for a full copy.*/ - template - const basic_formatter& operator << (const TToken& s) const { + template ::value>::type * = nullptr> + const basic_formatter &operator<<(const TToken &s) const { underlying << s; return *this; } - template - basic_formatter& operator << (const TToken& s) { + template ::value>::type * = nullptr> + const basic_formatter &operator<<(const TToken &s) const { + underlying << s.what(); + return *this; + } + + template ::value>::type * = nullptr> + basic_formatter &operator<<(const TToken &s) { underlying << s; return *this; } + template ::value>::type * = nullptr> + basic_formatter &operator<<(const TToken &s) { + underlying << s.what(); + return *this; + } + // comma operator overloaded as well, choose your preferred way. template const basic_formatter& operator, (const TToken& s) const { - underlying << s; + *this << s; return *this; } template basic_formatter& operator, (const TToken& s) { - underlying << s; + *this << s; return *this; } @@ -149,7 +161,7 @@ public: // See https://sourceforge.net/projects/assimp/forums/forum/817654/topic/4372824 template basic_formatter& operator, (TToken& s) { - underlying << s; + *this << s; return *this; }