diff --git a/.travis.yml b/.travis.yml index 2b1bc699..99ee6d1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ env: matrix: include: - # check code formatting + # check code formatting - os: linux compiler: gcc env: NAME="check code formatting" CHECK_FORMATTING=true @@ -147,6 +147,22 @@ matrix: sources: ['ubuntu-toolchain-r-test'] packages: ['g++-7', 'libboost-all-dev', 'ninja-build'] env: NAME="g++-7" COMPILER=g++-7 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true + + - os: linux + compiler: gcc + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['g++-8', 'libboost-all-dev', 'ninja-build'] + env: NAME="g++-8" COMPILER=g++-8 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true + + - os: linux + compiler: gcc + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['g++-9', 'libboost-all-dev', 'ninja-build'] + env: NAME="g++-9" COMPILER=g++-9 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true # Linux / CLang - os: linux @@ -198,6 +214,41 @@ matrix: env: COMPILER=clang++-5.0 ARCH=x86_64 CONF=Release UNIT_TESTS=true # OSX/Clang + - os: osx + osx_image: xcode10.2 + compiler: clang + env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + + - os: osx + osx_image: xcode10.1 + compiler: clang + env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + + - os: osx + osx_image: xcode10 + compiler: clang + env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + + - os: osx + osx_image: xcode9.4 + compiler: clang + env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + + - os: osx + osx_image: xcode9.4 + compiler: clang + env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + + - os: osx + osx_image: xcode9.3 + compiler: clang + env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + + - os: osx + osx_image: xcode9.3 + compiler: clang + env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=false BUILD_EXAMPLES=true + - os: osx osx_image: xcode9.2 compiler: clang diff --git a/src/rttr/detail/registration/bind_impl.h b/src/rttr/detail/registration/bind_impl.h index 7bb63278..407f7399 100644 --- a/src/rttr/detail/registration/bind_impl.h +++ b/src/rttr/detail/registration/bind_impl.h @@ -295,7 +295,7 @@ class registration::bind(args)...)), std::move(get_default_args, function_type>(std::forward(args)...)), std::move(create_param_infos, function_type>(std::forward(args)...))); - return std::move(ctor); + return ctor; } public: bind(const std::shared_ptr& reg_exec, F func) @@ -678,7 +678,7 @@ class registration::bind : std::move(get_metadata(std::forward(args)...)), std::move(get_default_args, function_type>(std::forward(args)...)), std::move(create_param_infos, function_type>(std::forward(args)...)) ); - return std::move(meth); + return meth; } template diff --git a/src/unit_tests/CMakeLists.txt b/src/unit_tests/CMakeLists.txt index c4142c12..bd68449e 100644 --- a/src/unit_tests/CMakeLists.txt +++ b/src/unit_tests/CMakeLists.txt @@ -30,6 +30,7 @@ add_subdirectory(base_library) set(HPP_FILES "") set(SRC_FILES "") +cmake_policy(SET CMP0025 NEW) project(unit_tests LANGUAGES CXX) message(STATUS "Scanning " ${PROJECT_NAME} " module.") @@ -53,8 +54,19 @@ set_target_properties(unit_tests PROPERTIES DEBUG_POSTFIX ${RTTR_DEBUG_POSTFIX} CXX_STANDARD ${MAX_CXX_STANDARD}) set_compiler_warnings(unit_tests) -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0.1) - target_compile_options(unit_tests PRIVATE -Wno-error=self-assign-overloaded) + +message("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") +message("CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}") +message("XCODE_VERSION: ${XCODE_VERSION}") + +if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0.1.10010046") + OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.0.1") + OR (XCODE AND XCODE_VERSION VERSION_GREATER "10.1")) + target_compile_options(unit_tests PRIVATE -Wno-error=self-assign-overloaded) +endif() + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.1.0") + target_compile_options(unit_tests PRIVATE -Wno-error=init-list-lifetime) endif() if (MSVC)