Skip to content

Commit

Permalink
Merge f79f0db into 9f0dc5b
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Sep 25, 2019
2 parents 9f0dc5b + f79f0db commit 6ff6426
Show file tree
Hide file tree
Showing 22 changed files with 882 additions and 227 deletions.
14 changes: 14 additions & 0 deletions include/internal/iutest_compiler.hpp
Expand Up @@ -355,22 +355,33 @@
# define IUTEST_CXX_DELETED_FUNCTION
#endif

#if !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION) && !IUTEST_HAS_RVALUE_REFS
# define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
#endif

//! has default function
#if !defined(IUTEST_HAS_DEFAULT_FUNCTIONS)
# if defined(__clang__)
# if __has_feature(cxx_defaulted_functions)
# define IUTEST_HAS_DEFAULT_FUNCTIONS 1
# endif
# elif defined(__GNUC__)
// move assignment operator = default is not works in gcc 4.4
// private destractor = default is not works in gcc 4.5 - 4.6
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
# define IUTEST_HAS_DEFAULT_FUNCTIONS 1
# if (_MSV_VER <= 1800) && !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
# define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
# endif
# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
# define IUTEST_HAS_DEFAULT_FUNCTIONS 1
# endif
# elif defined(_MSC_VER)
# if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 180020827)
# define IUTEST_HAS_DEFAULT_FUNCTIONS 1
# if (_MSV_VER <= 1800) && !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
# define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
# endif
# endif
# elif defined(__INTEL_COMPILER)
# if __INTEL_COMPILER >= 1200
Expand All @@ -382,6 +393,9 @@
#if !defined(IUTEST_HAS_DEFAULT_FUNCTIONS)
# define IUTEST_HAS_DEFAULT_FUNCTIONS 0
#endif
#if !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
# define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION IUTEST_HAS_DEFAULT_FUNCTIONS
#endif

//! default function
#if IUTEST_HAS_DEFAULT_FUNCTIONS
Expand Down
9 changes: 9 additions & 0 deletions include/internal/iutest_internal_defs.hpp
Expand Up @@ -19,6 +19,7 @@
// include
#include "../iutest_defs.hpp"
#include "iutest_string.hpp"
#include "iutest_string_view.hpp"
#include "iutest_type_traits.hpp"
#include "iutest_compatible_defs.hpp"
#include "iutest_exception.hpp"
Expand Down Expand Up @@ -119,6 +120,14 @@ namespace type_traits = iutest_type_traits;
namespace detail
{

//======================================================================
// types
#if IUTEST_HAS_NULLPTR
typedef ::std::nullptr_t iu_nullptr_convertible_t;
#else
typedef ::iutest_compatible::IsNullLiteralHelper::Object* iu_nullptr_convertible_t;
#endif

//======================================================================
// function

Expand Down
3 changes: 3 additions & 0 deletions include/internal/iutest_option_message.hpp
Expand Up @@ -201,6 +201,7 @@ inline void iuOptionMessage::ShowSpec()
IIUT_SHOW_MACRO(IUTEST_HAS_CXX17);
IIUT_SHOW_MACRO(IUTEST_HAS_CXX2A);
IIUT_SHOW_MACRO(IUTEST_HAS_DECLTYPE);
IIUT_SHOW_MACRO(IUTEST_HAS_DEFAULT_FUNCTIONS);
IIUT_SHOW_MACRO(IUTEST_HAS_DELETED_FUNCTIONS);
IIUT_SHOW_MACRO(IUTEST_HAS_EXCEPTIONS);
IIUT_SHOW_MACRO(IUTEST_HAS_EXPLICIT_CONVERSION);
Expand All @@ -215,6 +216,7 @@ inline void iuOptionMessage::ShowSpec()
IIUT_SHOW_MACRO(IUTEST_HAS_IOMANIP);
IIUT_SHOW_MACRO(IUTEST_HAS_LAMBDA);
IIUT_SHOW_MACRO(IUTEST_HAS_LAMBDA_STATEMENTS);
IIUT_SHOW_MACRO(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION);
IIUT_SHOW_MACRO(IUTEST_HAS_NOEXCEPT);
IIUT_SHOW_MACRO(IUTEST_HAS_NULLPTR);
IIUT_SHOW_MACRO(IUTEST_HAS_OVERRIDE_AND_FINAL);
Expand All @@ -236,6 +238,7 @@ inline void iuOptionMessage::ShowSpec()
IIUT_SHOW_MACRO(IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES);
IIUT_SHOW_MACRO(IUTEST_HAS_WANT_SECURE_LIB);
IIUT_SHOW_MACRO(IUTEST_USE_OWN_LIST);
IIUT_SHOW_MACRO(IUTEST_USE_OWN_STRING_VIEW);
IIUT_SHOW_MACRO(IUTEST_USE_THROW_ON_ASSERTION_FAILURE);
IIUT_SHOW_MACRO(IUTEST_WCHAR_UNSIGNED);

Expand Down
10 changes: 10 additions & 0 deletions include/internal/iutest_pragma.hpp
Expand Up @@ -225,6 +225,16 @@
# define IUTEST_PRAGMA_WARN_CAST_ALIGN()
#endif

#if defined(__clang__)
# define IUTEST_PRAGMA_WARN_CXX14_CONSTEXPR_NOT_IMPLY_CONST()
#elif defined(__GNUC__)
# define IUTEST_PRAGMA_WARN_CXX14_CONSTEXPR_NOT_IMPLY_CONST()
#elif defined(_MSC_VER)
# define IUTEST_PRAGMA_WARN_CXX14_CONSTEXPR_NOT_IMPLY_CONST() IUTEST_PRAGMA_MSC_WARN_DISABLE(4814)
#else
# define IUTEST_PRAGMA_WARN_CXX14_CONSTEXPR_NOT_IMPLY_CONST()
#endif

#if defined(__clang__)
# if (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ > 0))
# define IUTEST_PRAGMA_WARN_DISABLE_DANGLING_ELSE() IUTEST_PRAGMA_CLANG_WARN_DISABLE("-Wdangling-else")
Expand Down
3 changes: 3 additions & 0 deletions include/internal/iutest_stdlib.hpp
Expand Up @@ -27,6 +27,9 @@
# include <cstdio>
# define __STRICT_ANSI__
#endif
#if !defined(_MSC_VER)
# include <stdint.h>
#endif
#include <cstdlib>
#include <limits>

Expand Down

0 comments on commit 6ff6426

Please sign in to comment.