diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..fc6ad6c --- /dev/null +++ b/.clang-format @@ -0,0 +1,21 @@ +Standard: Cpp11 +Language: Cpp +AccessModifierOffset: 0 +IndentWidth: 2 +UseTab: Never +BinPackParameters: true +PointerAlignment: Left +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AllowShortBlocksOnASingleLine: true +AllowShortFunctionsOnASingleLine: true +ConstructorInitializerAllOnOneLineOrOnePerLine: true +AlwaysBreakTemplateDeclarations: false +NamespaceIndentation: None +PointerBindsToType: true +SpaceInParentheses: false +BreakBeforeBraces: Attach +ColumnLimit: 80 +Cpp11BracedListStyle: true +SpaceBeforeTrailingComments: 1 +SpaceBeforeParens: ControlStatements diff --git a/.travis.yml b/.travis.yml index f6d3256..a6e8674 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,6 @@ addons: matrix: include: # osx : clang : release - - os: osx - compiler: clang - env: BUILD=Release - osx_image: xcode7.2b3 - os: osx compiler: clang env: BUILD=Release @@ -69,10 +65,6 @@ matrix: env: BUILD=Release VERSION=4.8 # osx : clang : debug - - os: osx - compiler: clang - env: BUILD=Debug - osx_image: xcode7.2b3 - os: osx compiler: clang env: BUILD=Debug diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..93d59bb --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,23 @@ +platform: + - x86 + - x64 +configuration: + - Debug + - Release + +branches: + only: master +skip_tags: true +os: + - Visual Studio 2015 + +build: + parallel: true + verbosity: normal + +install: + - C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat + - + +build_script: + - cmake --build build --target check diff --git a/include/core/type_traits.hpp b/include/core/type_traits.hpp index 398dff9..9019f9c 100644 --- a/include/core/type_traits.hpp +++ b/include/core/type_traits.hpp @@ -18,10 +18,6 @@ template using identity = meta::identity; template using class_of_t = impl::class_of_t; template using class_of = impl::class_of; -template using conjunction = meta::all_t; -template using disjunction = meta::any_t; -template using negation = meta::none_t; - template <::std::size_t I, class T> using tuple_element_t = typename ::std::tuple_element::type; template using tuple_size_t = typename ::std::tuple_size::type; @@ -29,6 +25,28 @@ template using tuple_size_t = typename ::std::tuple_size::type; /* Implementation of N4389 */ template using bool_constant = ::std::integral_constant; +template struct conjunction; +template struct disjunction; +template struct negation; + +template +struct conjunction : + bool_constant::value> +{ }; +template <> struct conjunction<> : ::std::true_type { }; + +template +struct disjunction : + bool_constant::value> +{ }; +template <> struct disjunction<> : ::std::false_type { }; + +template +struct negation : + bool_constant::value> +{ }; +template <> struct negation<> : ::std::false_type { }; + /* C++ Library Fundamentals V2 TS detection idiom */ template using void_t = meta::deduce; diff --git a/scripts/travis-before-install b/scripts/travis-before-install index eadb321..281039d 100644 --- a/scripts/travis-before-install +++ b/scripts/travis-before-install @@ -9,13 +9,12 @@ VERSION=3.3.2 URL=https://cmake.org/files/v3.3/cmake-$VERSION-$(uname -s)-x86_64.tar.gz -function version { return $HOME/cmake/bin/cmake --version | head -n1; } +function version { $HOME/cmake/bin/cmake --version | head -n1; } if [[ -d $HOME/cmake && $VERSION = $(version | sed s/[^0-9]*//) ]]; then echo Using $(version) && exit 0 fi curl $URL -o cmake.tar.gz || exit 1 -tar xvzf cmake.tar.gz -ls -R $HOME/cmake - +tar xzf cmake.tar.gz -C cmake --strip-components=1 +ls $HOME/cmake diff --git a/scripts/travis-configure b/scripts/travis-configure index 2cfa0b6..02a8119 100644 --- a/scripts/travis-configure +++ b/scripts/travis-configure @@ -15,5 +15,5 @@ mkdir build && cd build || exit 1 $HOME/cmake/bin/cmake $CURRENT \ -DCMAKE_BUILD_TYPE:STRING=${BUILD:-Debug} \ -DBUILD_WITH_COVERAGE:BOOL=ON \ - -DBUILD_WITH_LIBCXX:BOOL=${LIBCXX:-OFF} + -DBUILD_WITH_LIBCXX:BOOL=${LIBCXX:-OFF} \ -DBUILD_TESTING:BOOL=ON