From a16b9dc12ebebb599bbf1db99883793719d775c0 Mon Sep 17 00:00:00 2001
From: Sam Yates <yates@cscs.ch>
Date: Wed, 3 May 2017 10:58:24 +0200
Subject: [PATCH] Fix warnings and errors with icpc build. (#246)

Fixes #245.

    Add missing header <system_error> to src/util/strprintf.hpp
    Remove redundant const in cell_kind returns.
---
 src/cell.hpp           | 2 +-
 src/cell_group.hpp     | 2 +-
 src/mc_cell_group.hpp  | 2 +-
 src/util/strprintf.hpp | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/cell.hpp b/src/cell.hpp
index 40a49b51..13fb3a72 100644
--- a/src/cell.hpp
+++ b/src/cell.hpp
@@ -100,7 +100,7 @@ public:
      }
 
     /// Return the kind of cell, used for grouping into cell_groups
-    cell_kind const get_cell_kind() const  {
+    cell_kind get_cell_kind() const  {
         return cell_kind::cable1d_neuron;
     }
 
diff --git a/src/cell_group.hpp b/src/cell_group.hpp
index 9f5dc595..35a67c29 100644
--- a/src/cell_group.hpp
+++ b/src/cell_group.hpp
@@ -18,7 +18,7 @@ class cell_group {
 public:
     virtual ~cell_group() = default;
 
-    virtual cell_kind const get_cell_kind() const = 0;
+    virtual cell_kind get_cell_kind() const = 0;
 
     virtual void reset() = 0;
     virtual void set_binning_policy(binning_kind policy, time_type bin_interval) = 0;
diff --git a/src/mc_cell_group.hpp b/src/mc_cell_group.hpp
index d198a5b7..dec775f8 100644
--- a/src/mc_cell_group.hpp
+++ b/src/mc_cell_group.hpp
@@ -61,7 +61,7 @@ public:
         EXPECTS(spike_sources_.size()==n_detectors);
     }
 
-    cell_kind const get_cell_kind() const override {
+    cell_kind get_cell_kind() const override {
         return cell_kind::cable1d_neuron;
     }
 
diff --git a/src/util/strprintf.hpp b/src/util/strprintf.hpp
index 218d38bc..e40a2d71 100644
--- a/src/util/strprintf.hpp
+++ b/src/util/strprintf.hpp
@@ -6,6 +6,7 @@
 #include <cstdio>
 #include <memory>
 #include <string>
+#include <system_error>
 #include <utility>
 #include <vector>
 
-- 
GitLab