Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump to C++17 #93

Merged
merged 10 commits into from
May 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
FROM debian:9.8
FROM fedora:32

RUN apt-get update && apt-get install -y \
git \
ssh \
tar \
gzip \
ca-certificates \
cmake \
build-essential
RUN \
dnf makecache && \
dnf -y update && \
dnf -y groupinstall "C Development Tools and Libraries" && \
dnf -y install \
cmake \
curl \
git \
gzip \
openssl-devel \
tar \
wget \
which && \
dnf clean all
2 changes: 1 addition & 1 deletion .circleci/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM matthewjamesbriggs/mxci:v001
FROM matthewjamesbriggs/mxci:v002

ENV BASEDIR="/mx"
WORKDIR $BASEDIR
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
docker:
# specify the version you desire here
- image: matthewjamesbriggs/mxci:v001
- image: matthewjamesbriggs/mxci:v002

working_directory: ~/mx

Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(Mx)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set(CPP_VERSION 17)

option(MX_BUILD_TESTS "build or skip the test suite" OFF)

Expand Down Expand Up @@ -43,7 +44,7 @@ source_group( "core" FILES ${SRC_MX_CORE} )
source_group( "impl" FILES ${SRC_MX_IMPL} )
source_group( "utility" FILES ${SRC_MX_UTILITY} )
source_group( "ezxml" FILES ${SRC_MX_EZXML} )
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD ${CPP_VERSION})

target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_DIR})

Expand Down Expand Up @@ -122,7 +123,7 @@ if(MX_BUILD_TESTS)

target_link_libraries(${TEST_BINARY_NAME} ${PROJECT_NAME})
target_link_libraries(${TEST_BINARY_NAME} ${CMAKE_THREAD_LIBS_INIT})
set_property(TARGET ${TEST_BINARY_NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${TEST_BINARY_NAME} PROPERTY CXX_STANDARD ${CPP_VERSION})
else()
message(STATUS "${PROJECT_NAME}:${CMAKE_CURRENT_LIST_LINE} tests will NOT be compiled")
endif()
Expand All @@ -136,9 +137,9 @@ if(MX_BUILD_EXAMPLES)
target_link_libraries(MxRead ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(MxWrite ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(MxHide ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
set_property(TARGET MxRead PROPERTY CXX_STANDARD 14)
set_property(TARGET MxWrite PROPERTY CXX_STANDARD 14)
set_property(TARGET MxHide PROPERTY CXX_STANDARD 14)
set_property(TARGET MxRead PROPERTY CXX_STANDARD ${CPP_VERSION})
set_property(TARGET MxWrite PROPERTY CXX_STANDARD ${CPP_VERSION})
set_property(TARGET MxHide PROPERTY CXX_STANDARD ${CPP_VERSION})
else()
message(STATUS "${PROJECT_NAME}:${CMAKE_CURRENT_LIST_LINE} examples will NOT be compiled")
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MusicXML Class Library
- License: MIT
- Version: 1.0
- Supported MusicXML Version: 3.0
- Language: C++14
- Language: C++17

-----------------------------------------

Expand Down
31 changes: 19 additions & 12 deletions Sourcecode/private/cpul/catch.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Catch v2.11.1
* Generated: 2019-12-28 21:22:11.930976
* Manually patched with these changes:
* https://github.com/catchorg/Catch2/pull/1929/files
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved.
Expand Down Expand Up @@ -2131,22 +2133,27 @@ namespace Catch {

namespace Catch
{
struct not_this_one
{
}; // Tag type for detecting which begin/ end are being selected

// Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace
// Import begin/ end from std here
using std::begin;
using std::end;

not_this_one begin( ... );
not_this_one end( ... );
namespace detail {
template <typename...>
struct void_type {
using type = void;
};

template<typename T>
struct is_range
{
static const bool value = !std::is_same<decltype( begin( std::declval<T>() ) ), not_this_one>::value
&& !std::is_same<decltype( end( std::declval<T>() ) ), not_this_one>::value;
template <typename T, typename = void>
struct is_range_impl : std::false_type {
};

template <typename T>
struct is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> : std::true_type {
};
} // namespace detail

template <typename T>
struct is_range : detail::is_range_impl<T> {
};

#if defined(_MANAGED) // Managed types are never ranges
Expand Down
4 changes: 2 additions & 2 deletions Xcode/Mx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10069,7 +10069,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -10152,7 +10152,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down
4 changes: 2 additions & 2 deletions Xcode/MxTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -2354,7 +2354,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down