|
[yoda-svn] yoda: 5 new changesetsYODA Mercurial yoda at projects.hepforge.orgMon Aug 3 17:00:01 BST 2015
details: https://yoda.hepforge.org/hg/yoda/rev/1552a789b405 branches: write_permissions changeset: 1082:1552a789b405 user: Lukas Heinrich <lukas.heinrich at gmail.com> date: Mon Jul 27 20:37:13 2015 +0100 description: throw exception on file permissions details: https://yoda.hepforge.org/hg/yoda/rev/9494b7bc42f9 branches: write_permissions changeset: 1083:9494b7bc42f9 user: Lukas Heinrich <lukas.heinrich at gmail.com> date: Wed Jul 29 13:17:52 2015 +0100 description: writing details: https://yoda.hepforge.org/hg/yoda/rev/a680f1999536 branches: write_permissions changeset: 1084:a680f1999536 user: Lukas Heinrich <lukas.heinrich at gmail.com> date: Mon Aug 03 12:30:02 2015 +0100 description: templated overload for types with dereference op to AO details: https://yoda.hepforge.org/hg/yoda/rev/afa4473a8014 branches: changeset: 1085:afa4473a8014 user: Lukas Heinrich <lukas.heinrich at gmail.com> date: Mon Aug 03 13:50:39 2015 +0100 description: merged fix for dereferencable types (smart pointers) details: https://yoda.hepforge.org/hg/yoda/rev/bb1c4ace4bf9 branches: write_permissions changeset: 1086:bb1c4ace4bf9 user: Lukas Heinrich <lukas.heinrich at gmail.com> date: Mon Aug 03 13:52:23 2015 +0100 description: closing branch. merged to default diffs (truncated from 169 to 50 lines): --- a/include/YODA/Exceptions.h Wed Jul 08 12:03:39 2015 +0100 +++ b/include/YODA/Exceptions.h Mon Aug 03 13:52:23 2015 +0100 @@ -89,6 +89,13 @@ }; + /// Error for file writing errors + class WriteError : public Exception { + public: + WriteError(const std::string& what) : Exception(what) {} + }; + + /// Error for problems introduced outside YODA, to put it nicely. class UserError : public Exception { public: --- a/include/YODA/Makefile.am Wed Jul 08 12:03:39 2015 +0100 +++ b/include/YODA/Makefile.am Mon Aug 03 13:52:23 2015 +0100 @@ -25,6 +25,7 @@ Utils/Formatting.h \ Utils/Predicates.h \ Utils/BinSearcher.h \ + Utils/Traits.h \ Utils/sortedvector.h \ Utils/cachedvector.h \ Utils/indexedset.h \ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/YODA/Utils/Traits.h Mon Aug 03 13:52:23 2015 +0100 @@ -0,0 +1,26 @@ +// -*- C++ -*- +// +// This file is part of YODA -- Yet more Objects for Data Analysis +// Copyright (C) 2008-2015 The YODA collaboration (see AUTHORS for details) +// +#ifndef YODA_TRAITS_H +#define YODA_TRAITS_H + +#include <boost/type_traits/has_dereference.hpp> + +namespace YODA{ + //SFINAE struct to check for iterator concept at compile time + template<typename T> + struct Iterable{ + typedef char yes[1]; typedef char no[2]; + template <typename C> static yes& test(typename C::const_iterator* c); + template <typename> static no& test(...); + static const bool value = sizeof(test<T>(0)) == sizeof(yes); + }; + + template<typename T>
More information about the yoda-svn mailing list |