Skip to content
Commits on Source (4)
......@@ -2,7 +2,7 @@
# setup version numbers
set(VERSION_MAJOR 0)
set(VERSION_MINOR 8)
set(VERSION_PATCH 2)
set(VERSION_PATCH 4)
set(VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
message("Project version: ${VERSION_STR}")
......
camp (0.8.4-1) UNRELEASED; urgency=medium
* New upstream version 0.8.4.
* d/control: Change HomePage
* d/copyright: Change source url
* d/watch: Change url
-- Flavien Bridault <fbridault@ircad.fr> Mon, 09 Dec 2019 07:47:39 +0000
camp (0.8.2-2) unstable; urgency=medium
* d/rules: Install CMake files
......
......@@ -12,7 +12,7 @@ Build-Depends: cmake,
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/camp
Vcs-Git: https://salsa.debian.org/med-team/camp.git
Homepage: https://github.com/tegesoft/camp
Homepage: https://github.com/IRCAD-IHU/camp
Package: libcamp0.8
Architecture: any
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: camp
Source: https://github.com/fw4spl-org/camp
Source: https://github.com/IRCAD-IHU/camp
Files: *
Copyright: 2009-2014 TEGESO/TEGESOFT and/or its subsidiary(-ies) and mother company.
......
version=3
https://github.com/fw4spl-org/camp/releases .*/archive/(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
https://github.com/IRCAD-IHU/camp/releases .*/archive/(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
......@@ -35,56 +35,56 @@
#include <camp/detail/yesnotype.hpp>
#include <boost/utility/enable_if.hpp>
#include <type_traits>
#include <memory>
namespace camp
{
namespace detail
template<class T>
T* get_pointer(T *p)
{
return p;
}
template<class T>
T* get_pointer(std::unique_ptr<T> const& p)
{
return p.get();
}
template<class T>
T* get_pointer(std::shared_ptr<T> const& p)
{
return p.get();
}
namespace detail {
/**
* \brief Utility class which tells at compile-time if a type T is a smart pointer to a type U
*
* To detect a smart pointer type, we check using SFINAE if T implements an operator -> returning a U*
*/
template <typename T, typename U>
struct IsSmartPointer
{
enum {value = (!std::is_pointer<T>::value && !std::is_same<T, U>::value) };
{
enum {value = false};
};
} // namespace detail
} // namespace camp
namespace boost
{
/**
* \brief Specialization of boost::get_pointer for all smart pointer types (const version)
*
* This function is specialized for every type T for which IsSmartPointer<T> is true. It makes
* the stored value available for all boost algorithms (especially for boost::bind).
*/
template <template <typename> class T, typename U>
U* get_pointer(const T<U>& obj, typename enable_if<camp::detail::IsSmartPointer<T<U>, U> >::type* = 0)
template <typename T, typename U>
struct IsSmartPointer<std::unique_ptr<T>, U>
{
return obj.get();
}
enum {value = true};
};
/**
* \brief Specialization of boost::get_pointer for all smart pointer types (non-const version)
*
* This function is specialized for every type T for which IsSmartPointer<T> is true. It makes
* the stored value available for all boost algorithms (especially for boost::bind).
*/
template <template <typename> class T, typename U>
U* get_pointer(T<U>& obj, typename enable_if<camp::detail::IsSmartPointer<T<U>, U> >::type* = 0)
template <typename T, typename U>
struct IsSmartPointer<std::shared_ptr<T>, U>
{
return obj.get();
}
enum {value = true};
};
} // namespace boost
} // namespace detail
} // namespace camp
#endif // CAMP_DETAIL_ISSMARTPOINTER_HPP
......@@ -93,7 +93,7 @@ struct ObjectTraits<T*>
{
enum
{
isWritable = !boost::is_const<T>::value,
isWritable = !std::is_const<T>::value,
isRef = true
};
......@@ -113,7 +113,7 @@ struct ObjectTraits<T<U>, typename boost::enable_if<IsSmartPointer<T<U>, U> >::t
{
enum
{
isWritable = !boost::is_const<U>::value,
isWritable = !std::is_const<U>::value,
isRef = true
};
......@@ -122,7 +122,7 @@ struct ObjectTraits<T<U>, typename boost::enable_if<IsSmartPointer<T<U>, U> >::t
typedef typename RawType<U>::Type DataType;
static RefReturnType get(void* pointer) {return static_cast<U*>(pointer);}
static PointerType getPointer(T<U> value) {return boost::get_pointer(value);}
static PointerType getPointer(T<U> value) {return get_pointer(value);}
};
/*
......@@ -149,7 +149,7 @@ struct ObjectTraits<T&, typename boost::disable_if<boost::is_pointer<typename Ob
{
enum
{
isWritable = !boost::is_const<T>::value,
isWritable = !std::is_const<T>::value,
isRef = true
};
......
......@@ -91,7 +91,7 @@ namespace PropertyTest
const int p6;
std::string p7_impl; std::string* p7;
MyEnum p8_impl; const MyEnum* p8;
boost::shared_ptr<MyType> p9;
std::shared_ptr<MyType> p9;
// ***** member functions *****
bool p10; bool getP10() {return p10;}
......