Skip to content

Commit

Permalink
[COMP] Remove old nullptr detection
Browse files Browse the repository at this point in the history
Possible fix for issue coolfluid#271
  • Loading branch information
barche committed Jan 11, 2018
1 parent f1bdfb6 commit ed8bcaa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 110 deletions.
22 changes: 3 additions & 19 deletions cf3/common/CF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,9 @@

////////////////////////////////////////////////////////////////////////////////

// define the nullptr either as macro or as nullptr idiom until C++0x
#ifdef CF3_CXX_MANUAL_NATIVE_NULLPTR
using std::nullptr_t;
#else
#ifdef CF3_CXX_SUPPORTS_NULLPTR
const class nullptr_t
{
public:
template<class T> operator T*() const { return 0; }
template<class C, class T> operator T C::*() const { return 0; }
private:
void operator&() const;
} nullptr = {};
#elif defined CF3_CXX_NATIVE_NULLPTR
using std::nullptr_t;
#else
#define nullptr 0
#endif
#endif

using std::nullptr_t;


////////////////////////////////////////////////////////////////////////////////

Expand Down
4 changes: 0 additions & 4 deletions cmake/CheckCompilerFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@
# coolfluid_log( "+++++ Checking for pre compiled header support" )
# include(CheckPreCompiledHeaderSupport)

#######################################################################################

include(CheckNullPtr)

#######################################################################################

check_cxx_source_compiles(
Expand Down
84 changes: 0 additions & 84 deletions cmake/CheckNullPtr.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/DefineBuildRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set( CF3_LIBRARY_LINK_FLAGS "" CACHE STRING "Extra link flags for libraries" FOR
mark_as_advanced( CF3_LIBRARY_LINK_FLAGS )

# Switch on C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DCF3_CXX_MANUAL_NATIVE_NULLPTR")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

########################################################################################
# GCC Compiler
Expand Down
2 changes: 0 additions & 2 deletions config/coolfluid-config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
#endif

// compiler features
#cmakedefine CF3_CXX_SUPPORTS_NULLPTR // nullptr as type
#cmakedefine CF3_CXX_NATIVE_NULLPTR // nullptr as type, defined in cstddef
#define CXX_NEEDS_FRIEND_TMPL_DECL // cxx friend templates
#define cf_restrict ${CF3_RESTRICT_KEYWORD} // define our restrict keyword

Expand Down

0 comments on commit ed8bcaa

Please sign in to comment.