From d51dc9068083a3d7cc30c822c04154a9d3fd10bd Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Sat, 27 Mar 2010 20:11:49 +0000
Subject: [PATCH] only add MPI_Comm specialization if MPI is used

[[Imported from SVN: r5950]]
---
 dune/common/mpiguard.hh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dune/common/mpiguard.hh b/dune/common/mpiguard.hh
index ebc8eac07..4af70fafd 100644
--- a/dune/common/mpiguard.hh
+++ b/dune/common/mpiguard.hh
@@ -49,6 +49,8 @@ namespace Dune
       virtual int size() { return comm.size(); };
       virtual int sum(int i) { return comm.sum(i); }
     };
+
+#if HAVE_MPI
     // specialization for MPI_Comm
     template <>
     struct GenericGuardCommunicator<MPI_Comm>
@@ -58,6 +60,7 @@ namespace Dune
         GenericGuardCommunicator< CollectiveCommunication<MPI_Comm> >(
           CollectiveCommunication<MPI_Comm>(c)) {}
     };
+#endif
 
     template<class C>
     GuardCommunicator * GuardCommunicator::create(const C & comm)
-- 
GitLab