Commit 6b24398f authored by Jan Möbius's avatar Jan Möbius

Merge branch 'VS2015_test' into 'master'

Try to get c++11 on visual studio 2015



See merge request !26
parents 35bca868 f907bd9b
Pipeline #130 failed with stage
......@@ -114,7 +114,7 @@ public:
typedef Decimater::ModNormalFlippingT< mesh_t >::Handle mod_nf_t;
// object types
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
typedef std::unique_ptr< decimater_t > decimater_o;
#else
typedef std::auto_ptr< decimater_t > decimater_o;
......
......@@ -131,7 +131,7 @@ public:
bool bind( osg::GeometryPtr geo )
{
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
std::unique_ptr<mesh_t> obj(new mesh_t);
#else
std::auto_ptr<mesh_t> obj(new mesh_t);
......
......@@ -60,7 +60,7 @@
// macro expansion and preprocessor defines
// don't work properly.
#if (__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
#if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
#include "Vector11T.hh"
#else
#ifndef DOXYGEN
......
......@@ -70,7 +70,7 @@
#include <string>
#include <algorithm>
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#include <mutex>
#endif
......@@ -189,7 +189,7 @@ protected:
virtual int sync()
{
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std::lock_guard<std::mutex> lck (serializer_);
#endif
......@@ -214,7 +214,7 @@ protected:
char c = traits_type::to_char_type(_c);
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
{
std::lock_guard<std::mutex> lck (serializer_);
buffer_.push_back(c);
......@@ -264,7 +264,7 @@ private:
bool enabled_;
// If working on multiple threads, we need to serialize the output correctly (requires c++11 headers)
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std::mutex serializer_;
#endif
......
......@@ -76,7 +76,7 @@ namespace OpenMesh {
*/
template<typename PROPTYPE, typename MeshT>
class PropertyManager {
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
public:
PropertyManager(const PropertyManager&) = delete;
PropertyManager& operator=(const PropertyManager&) = delete;
......@@ -148,7 +148,7 @@ class PropertyManager {
MeshT &getMesh() const { return *mesh_; }
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/// Only for pre C++11 compatibility.
typedef PropertyManager<PROPTYPE, MeshT> Proxy;
......
......@@ -78,7 +78,7 @@ template<class Mesh>
DecimaterT<Mesh>::DecimaterT(Mesh& _mesh) :
BaseDecimaterT<Mesh>(_mesh),
mesh_(_mesh),
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_(nullptr)
#else
heap_(NULL)
......@@ -178,7 +178,7 @@ size_t DecimaterT<Mesh>::decimate(size_t _n_collapses) {
// initialize heap
HeapInterface HI(mesh_, priority_, heap_position_);
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_ = std::unique_ptr<DeciHeap>(new DeciHeap(HI));
#else
heap_ = std::auto_ptr<DeciHeap>(new DeciHeap(HI));
......@@ -279,7 +279,7 @@ size_t DecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
// initialize heap
HeapInterface HI(mesh_, priority_, heap_position_);
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
heap_ = std::unique_ptr<DeciHeap>(new DeciHeap(HI));
#else
heap_ = std::auto_ptr<DeciHeap>(new DeciHeap(HI));
......
......@@ -173,7 +173,7 @@ private: //------------------------------------------------------- private data
Mesh& mesh_;
// heap
#if __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
std::unique_ptr<DeciHeap> heap_;
#else
std::auto_ptr<DeciHeap> heap_;
......
......@@ -79,7 +79,7 @@
#include "Config.hh"
#include <vector>
#include <OpenMesh/Core/System/omstream.hh>
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#include <utility>
#endif
......@@ -150,7 +150,7 @@ public:
/// Constructor
HeapT() : HeapVector() {}
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/// Construct with a given \c HeapIterface.
HeapT(HeapInterface _interface)
: HeapVector(), interface_(std::move(_interface))
......
......@@ -53,7 +53,7 @@ class OpenMesh_Triangle : public OpenMeshBase {
* ====================================================================
*/
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
/*
*/
......
......@@ -84,7 +84,7 @@ TEST_F(OpenMeshVectorTest, VectorCasting) {
}
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#if _MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
TEST_F(OpenMeshVectorTest, cpp11_constructors) {
OpenMesh::Vec3d vec1 { 1.2, 2.0, 3.0 };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment