#include <functional> and suppress struct/class warning for VC10

This commit is contained in:
Andreas Fabri 2015-06-01 10:42:52 +02:00
parent 5ffa02c796
commit b6850d35c0
6 changed files with 71 additions and 7 deletions

View File

@ -21,6 +21,8 @@
#ifndef CGAL_ARRANGEMENT_2_ITERATORS_H
#define CGAL_ARRANGEMENT_2_ITERATORS_H
#include <functional>
/*! \file
* Definitions of auxiliary iterator adaptors.
*/
@ -556,7 +558,11 @@ public:
} //namespace CGAL
namespace std {
template <typename T> struct hash;
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4099) // For VC10 it is class hash
#endif
template <class CIterator_, class Filter_, class MIterator_,
class Value_, class Diff_, class Category_>
@ -642,5 +648,10 @@ struct hash<CGAL::I_Filtered_const_iterator<CIterator_,
return reinterpret_cast<std::size_t>(&*i) / sizeof(typename I::value_type);
}
};
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
}
#endif

View File

@ -20,6 +20,8 @@
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H
#include <functional>
#include <boost/config.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/iterator/transform_iterator.hpp>
@ -30,7 +32,6 @@
#include <CGAL/basic.h>
#include <CGAL/boost/graph/iterator.h>
#include <CGAL/Handle_hash_function.h>
#ifndef CGAL_NO_DEPRECATED_CODE
@ -219,7 +220,11 @@ public:
namespace std {
template <typename T> struct hash;
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4099) // For VC10 it is class hash
#endif
template <typename H>
struct hash<CGAL::internal::HDS_edge<H> > {
@ -230,5 +235,11 @@ namespace std {
return fct(e.halfedge());
}
};
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
}
#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H

View File

@ -20,6 +20,8 @@
#ifndef CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
#define CGAL_GRAPH_TRAITS_TRIANGULATION_2_H
#include <functional>
#include <boost/config.hpp>
#include <boost/iterator_adaptors.hpp>
#include <boost/graph/graph_traits.hpp>
@ -828,7 +830,12 @@ namespace boost {
namespace std {
template <typename T> struct hash;
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4099) // For VC10 it is class hash
#endif
template < class T, class EdgeBase>
struct hash<CGAL::detail::Edge<T,EdgeBase> > {
@ -847,6 +854,11 @@ namespace std {
return hash_value(e);
}
};
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
} // namespace std
//#include <CGAL/graph_traits_Delaunay_triangulation_2.h>

View File

@ -28,6 +28,7 @@
#include <algorithm>
#include <vector>
#include <cstring>
#include <functional>
#include <CGAL/memory.h>
#include <CGAL/iterator.h>
@ -1170,7 +1171,11 @@ namespace internal {
} //namespace CGAL
namespace std {
template <typename T> struct hash;
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4099) // For VC10 it is class hash
#endif
template < class DSC, bool Const >
struct hash<CGAL::internal::CC_iterator<DSC, Const> >
@ -1181,6 +1186,10 @@ namespace std {
return reinterpret_cast<std::size_t>(&*i) / sizeof(typename DSC::value_type);
}
};
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
}
#endif // CGAL_COMPACT_CONTAINER_H

View File

@ -34,6 +34,7 @@
#include <algorithm>
#include <CGAL/memory.h>
#include <boost/functional/hash.hpp>
#include <functional>
namespace CGAL {
@ -772,7 +773,11 @@ void In_place_list<T,managed,Alloc>::sort() {
} //namespace CGAL
namespace std {
template <typename T> struct hash;
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4099) // For VC10 it is class hash
#endif
template < class T, class Alloc >
struct hash<CGAL::internal::In_place_list_iterator<T, Alloc> >
@ -795,5 +800,10 @@ namespace std {
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
}
};
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
}
#endif // CGAL_IN_PLACE_LIST_H

View File

@ -27,6 +27,7 @@
#include <vector>
#include <string>
#include <typeinfo>
#include <functional>
#include <boost/cstdint.hpp>
#include <boost/array.hpp>
@ -2971,7 +2972,11 @@ returns `i` as hash value for the index types `Vertex_index`, `Halfedge_index`,
namespace std {
template <typename T> struct hash;
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable:4099) // For VC10 it is class hash
#endif
template <>
struct hash<CGAL::SM_Halfedge_index >
@ -3022,6 +3027,12 @@ namespace boost {
return i;
}
};
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
}
#endif /* CGAL_SURFACE_MESH_H */