X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/817094bccfaafe29059ed2ff71c573699d5909bd..53300623ffc4a530dedcc517d559926ea0891edf:/include/xbt/exception.hpp diff --git a/include/xbt/exception.hpp b/include/xbt/exception.hpp index 7c826cd697..8fa032d966 100644 --- a/include/xbt/exception.hpp +++ b/include/xbt/exception.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2016. The SimGrid Team.All rights reserved. */ +/* Copyright (c) 2005-2018. The SimGrid Team.All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -65,7 +65,7 @@ class ThrowPoint { * However, you can try `dynamic_cast` an exception to this type in order to * get contextual information about the exception. */ -XBT_PUBLIC_CLASS WithContextException { +class XBT_PUBLIC WithContextException { public: WithContextException() : backtrace_(simgrid::xbt::backtrace()), @@ -99,8 +99,7 @@ class WithContext : public E, public WithContextException public: static_assert(not std::is_base_of::value, "Trying to appli WithContext twice"); - WithContext(E exception) : - E(std::move(exception)) {} + explicit WithContext(E exception) : E(std::move(exception)) {} WithContext(E exception, ThrowPoint throwpoint, Backtrace backtrace) : E(std::move(exception)), WithContextException(throwpoint, std::move(backtrace)) {}