mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
* CMakeLists: only pass -Wextra if it's supported (it's not on gcc 3.3)
* MapBase: put static first (fix gcc 3.3 warning) * StdVector: add missing newline at end
This commit is contained in:
parent
fc8b54c142
commit
be8ae0d45f
@ -24,7 +24,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES Linux)
|
if(CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing")
|
include(CheckCXXCompilerFlag)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing")
|
||||||
|
check_cxx_compiler_flag("-Wextra" has_wextra)
|
||||||
|
if(has_wextra)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
|
||||||
|
endif()
|
||||||
if(NOT EIGEN_TEST_LIB)
|
if(NOT EIGEN_TEST_LIB)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
||||||
endif(NOT EIGEN_TEST_LIB)
|
endif(NOT EIGEN_TEST_LIB)
|
||||||
|
@ -144,4 +144,4 @@ class vector<T,DummyAlloc,true>
|
|||||||
|
|
||||||
#endif // EIGEN_STDVECTOR_MODULE_H
|
#endif // EIGEN_STDVECTOR_MODULE_H
|
||||||
|
|
||||||
#endif // EIGEN_USE_NEW_STDVECTOR
|
#endif // EIGEN_USE_NEW_STDVECTOR
|
||||||
|
@ -66,11 +66,11 @@ template<typename Derived> class MapBase
|
|||||||
inline const Scalar* data() const { return m_data; }
|
inline const Scalar* data() const { return m_data; }
|
||||||
|
|
||||||
template<bool IsForceAligned,typename Dummy> struct force_aligned_impl {
|
template<bool IsForceAligned,typename Dummy> struct force_aligned_impl {
|
||||||
AlignedDerivedType static run(MapBase& a) { return a.derived(); }
|
static AlignedDerivedType run(MapBase& a) { return a.derived(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Dummy> struct force_aligned_impl<false,Dummy> {
|
template<typename Dummy> struct force_aligned_impl<false,Dummy> {
|
||||||
AlignedDerivedType static run(MapBase& a) { return a.derived()._convertToForceAligned(); }
|
static AlignedDerivedType run(MapBase& a) { return a.derived()._convertToForceAligned(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** \returns an expression equivalent to \c *this but having the \c PacketAccess constant
|
/** \returns an expression equivalent to \c *this but having the \c PacketAccess constant
|
||||||
|
@ -37,6 +37,10 @@
|
|||||||
//classes inheriting ei_no_assignment_operator don't generate a default operator=.
|
//classes inheriting ei_no_assignment_operator don't generate a default operator=.
|
||||||
class ei_no_assignment_operator
|
class ei_no_assignment_operator
|
||||||
{
|
{
|
||||||
|
#if EIGEN_GCC3_OR_OLDER
|
||||||
|
protected:
|
||||||
|
void nevermind_this_is_just_to_work_around_a_stupid_gcc3_warning();
|
||||||
|
#endif
|
||||||
private:
|
private:
|
||||||
ei_no_assignment_operator& operator=(const ei_no_assignment_operator&);
|
ei_no_assignment_operator& operator=(const ei_no_assignment_operator&);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user