Fix compilation on win32 (#97)

* fix build flags for WIN32
* make mingw happy with template params
* correct few remarks
* declare StreamHandle constructor only for MSVC
* Return to old declaration of StreamHandle constructor
This commit is contained in:
Slyshyk Oleksiy 2017-08-29 00:34:17 +03:00 committed by Michele Caini
parent 01488c71df
commit 61d126020d
2 changed files with 4 additions and 4 deletions

View File

@ -32,11 +32,11 @@ message("*")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT WIN32)
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -DDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os -DRELEASE")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -DDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os -DRELEASE")
#
# CMake configuration

View File

@ -154,7 +154,7 @@ class StreamHandle: public Handle<T, U> {
}
public:
#ifdef _WIN32
#ifdef _MSC_VER
StreamHandle(ConstructorAccess ca, std::shared_ptr<Loop> ref)
: Handle{ca, std::move(ref)}
{}