From ee8ae965c210dbbccc9a25d8fa4b5113758885e1 Mon Sep 17 00:00:00 2001 From: Przemo Date: Tue, 26 Jun 2018 16:28:35 +0200 Subject: [PATCH] fix --- CMakeLists.txt | 2 +- inc/owned_pointer.hpp | 2 +- ut/owned_pointer_ut.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 818578e..294e978 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.2.2) project("owned_pointer" CXX) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(GMOCK_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/google-test/googlemock/include") set(GTEST_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/google-test/googletest/include") diff --git a/inc/owned_pointer.hpp b/inc/owned_pointer.hpp index 166fb65..a757c1a 100644 --- a/inc/owned_pointer.hpp +++ b/inc/owned_pointer.hpp @@ -388,7 +388,7 @@ inline bool is_expired_enabled_f(const owned_pointer& p) noexcept return p.expired() || dynamic_cast<_priv::shared_secret*>(p.operator->()) != nullptr; } -inline bool is_expired_enabled_f(...) noexcept +inline bool is_expired_enabled_f(...) noexcept { return false; } diff --git a/ut/owned_pointer_ut.cpp b/ut/owned_pointer_ut.cpp index 46ad001..3e021c8 100644 --- a/ut/owned_pointer_ut.cpp +++ b/ut/owned_pointer_ut.cpp @@ -171,14 +171,14 @@ TEST_F(owned_pointer_ut, isExpiredEnabledTest) ASSERT_FALSE(csp::is_expired_enabled>::value); ASSERT_FALSE(csp::is_expired_enabled&>::value); ASSERT_FALSE(csp::is_expired_enabled&&>::value); - + ASSERT_TRUE(csp::is_expired_enabled>::value); ASSERT_TRUE(csp::is_expired_enabled&>::value); ASSERT_TRUE(csp::is_expired_enabled&&>::value); ASSERT_TRUE(csp::is_expired_enabled>::value); ASSERT_TRUE(csp::is_expired_enabled&>::value); ASSERT_TRUE(csp::is_expired_enabled&&>::value); - + ASSERT_TRUE(csp::is_expired_enabled>::value); ASSERT_TRUE(csp::is_expired_enabled&>::value); ASSERT_TRUE(csp::is_expired_enabled&&>::value);