Blob Blame History Raw
From 32178e147a976419b9ac846d3c40c3ab4d1e0ff6 Mon Sep 17 00:00:00 2001
From: Mathias Gaunard <mathias@gaunard.com>
Date: Thu, 4 May 2017 17:18:22 +0100
Subject: [PATCH] Compatibility with GCC 7.1

The libstdc++ shipped with GCC 7.1 uses a unary class template for std::string.
type_to_string needs to be adapted to deal with this properly.
---
 include/boost/icl/type_traits/type_to_string.hpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/boost/icl/type_traits/type_to_string.hpp b/include/boost/icl/type_traits/type_to_string.hpp
index 80c473a..994711b 100644
--- a/include/boost/icl/type_traits/type_to_string.hpp
+++ b/include/boost/icl/type_traits/type_to_string.hpp
@@ -43,7 +43,6 @@ namespace boost{ namespace icl
 
     template<>inline std::string type_to_string<float>::apply() { return "flt"; }
     template<>inline std::string type_to_string<double>::apply() { return "dbl"; }
-    template<>inline std::string type_to_string<std::string>::apply() { return "string"; }
 
     //-------------------------------------------------------------------------
     template<template<class> class Templ>
@@ -78,6 +77,13 @@ namespace boost{ namespace icl
         }
     };
 
+    // ---------------------------------------------------------------------------
+    template<>
+    struct type_to_string<std::string>
+    {
+        static std::string apply() { return "string"; }
+    };
+
 }} // namespace boost icl
 
 #endif