From 161b65d2741281c655a986b3baf309467145bfa8 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi <giovanni.bussi@gmail.com> Date: Tue, 20 Nov 2018 08:43:48 +0100 Subject: [PATCH] fixed includes --- src/core/PlumedMain.cpp | 10 ++++++++++ src/core/PlumedMainInitializer.cpp | 14 ++++++++++++-- src/wrapper/Plumed.h | 10 +++++++--- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/core/PlumedMain.cpp b/src/core/PlumedMain.cpp index 89275e293..e8739d5a0 100644 --- a/src/core/PlumedMain.cpp +++ b/src/core/PlumedMain.cpp @@ -46,8 +46,18 @@ #include <cstring> #include <set> #include <unordered_map> +#include <exception> +#include <stdexcept> #include <ios> +#include <new> +#include <typeinfo> +#ifdef __PLUMED_LIBCXX11 +#include <system_error> #include <future> +#include <memory> +#include <functional> +#endif + using namespace std; diff --git a/src/core/PlumedMainInitializer.cpp b/src/core/PlumedMainInitializer.cpp index 5d524b137..aca124ac5 100644 --- a/src/core/PlumedMainInitializer.cpp +++ b/src/core/PlumedMainInitializer.cpp @@ -26,11 +26,21 @@ #include <cstdlib> #include <cstring> #include <iostream> -#include <system_error> -#include <future> #if defined __PLUMED_HAS_DLOPEN #include <dlfcn.h> #endif +#include <exception> +#include <stdexcept> +#include <ios> +#include <new> +#include <typeinfo> +#ifdef __PLUMED_LIBCXX11 +#include <system_error> +#include <future> +#include <memory> +#include <functional> +#endif + using namespace std; diff --git a/src/wrapper/Plumed.h b/src/wrapper/Plumed.h index cb7e3b509..a90638786 100644 --- a/src/wrapper/Plumed.h +++ b/src/wrapper/Plumed.h @@ -991,13 +991,17 @@ __PLUMED_WRAPPER_EXTERN_C_END /*}*/ #include <string.h> #endif -#include <exception> /* exception */ +#include <exception> /* exception bad_exception */ #include <stdexcept> /* runtime_error logic_error invalid_argument domain_error length_error out_of_range range_error overflow_error underflow_error */ #include <string> /* string */ #include <ios> /* iostream_category (C++11) ios_base::failure (C++11 and C++<11) */ -#if __cplusplus > 199711L -#include <system_error> /* generic_category system_category */ +#include <new> /* bad_alloc bad_array_new_length (C++11) */ +#include <typeinfo> /* bad_typeid bad_cast */ +#if __cplusplus > 199711L && __PLUMED_WRAPPER_LIBCXX11 +#include <system_error> /* system_error generic_category system_category */ #include <future> /* future_category */ +#include <memory> /* bad_weak_ptr */ +#include <functional> /* bad_function_call */ #endif /* C++ interface is hidden in PLMD namespace (same as plumed library) */ -- GitLab