From a1cecd2f75672fefa388104fd282e1e9df2357e5 Mon Sep 17 00:00:00 2001 From: Tomas Zeman Date: Fri, 27 Apr 2018 22:09:50 +0200 Subject: [PATCH] Version 1.0.0 --- example/README.md | 12 +-- include/cx.hpp | 4 +- include/wildcards.hpp | 4 +- single_include/cx.hpp | 194 +++++++++++++++++------------------ single_include/wildcards.hpp | 6 +- 5 files changed, 110 insertions(+), 110 deletions(-) diff --git a/example/README.md b/example/README.md index 76e2a28..ac480e3 100644 --- a/example/README.md +++ b/example/README.md @@ -1,30 +1,30 @@ -Example 1 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/kpmUefnkBF4mD69Q) +Example 1 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/E38lvVerm55qDy8C) ========= Compile time matching only. -Example 2 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/g1XFVimoQgYWNkwd) +Example 2 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/MgROPI42JCMrbDPj) ========= Compile time and runtime check of ID's validity using a pattern. -Example 3 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/q3UELcXrii7ISXLu) +Example 3 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/IZ0bALQl2s5fJizh) ========= Example 2 extended with a default pattern and with a user-defined string literal. -Example 4 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/sU2yAXSZdCH8NAAK) +Example 4 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/goJ3qZcAqCcjQomE) ========= Matching of command line arguments. -Example 5 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/34FWIpTTGDpYNJkV) +Example 5 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/0FLqhpOkNwc9gvI1) ========= List files on a given path which match a given pattern. -Example 6 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/185ZwcFG3HKMq3RX) +Example 6 [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/jkzdCaX2egYByfzc) ========= Matching of generated DNA sequences. diff --git a/include/cx.hpp b/include/cx.hpp index bae105d..94ff324 100644 --- a/include/cx.hpp +++ b/include/cx.hpp @@ -6,8 +6,8 @@ #ifndef CX_HPP #define CX_HPP -#define CX_VERSION_MAJOR 0 -#define CX_VERSION_MINOR 2 +#define CX_VERSION_MAJOR 1 +#define CX_VERSION_MINOR 0 #define CX_VERSION_PATCH 0 #include "cx/algorithm.hpp" diff --git a/include/wildcards.hpp b/include/wildcards.hpp index 076a723..a017639 100644 --- a/include/wildcards.hpp +++ b/include/wildcards.hpp @@ -6,8 +6,8 @@ #ifndef WILDCARDS_HPP #define WILDCARDS_HPP -#define WILDCARDS_VERSION_MAJOR 0 -#define WILDCARDS_VERSION_MINOR 2 +#define WILDCARDS_VERSION_MAJOR 1 +#define WILDCARDS_VERSION_MINOR 0 #define WILDCARDS_VERSION_PATCH 0 #include "wildcards/cards.hpp" diff --git a/single_include/cx.hpp b/single_include/cx.hpp index cc0e8cd..ed41a96 100644 --- a/single_include/cx.hpp +++ b/single_include/cx.hpp @@ -1,13 +1,13 @@ // THIS FILE HAS BEEN GENERATED AUTOMATICALLY. DO NOT EDIT DIRECTLY. -// Generated: 2018-04-23 18:35:25.466715844 +// Generated: 2018-04-27 20:08:52.300450472 // Copyright Tomas Zeman 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef CX_HPP #define CX_HPP -#define CX_VERSION_MAJOR 0 -#define CX_VERSION_MINOR 2 +#define CX_VERSION_MAJOR 1 +#define CX_VERSION_MINOR 0 #define CX_VERSION_PATCH 0 #ifndef CX_ALGORITHM_HPP #define CX_ALGORITHM_HPP @@ -337,99 +337,6 @@ #define cfg_constexpr14 #endif #endif -#ifndef CX_ITERATOR_HPP -#define CX_ITERATOR_HPP -#include -#include -namespace cx -{ -template -constexpr It next(It it) -{ -return it + 1; -} -template -constexpr It prev(It it) -{ -return it - 1; -} -template -constexpr auto size(const C& c) -> decltype(c.size()) -{ -return c.size(); -} -template -constexpr std::size_t size(const T (&)[N]) -{ -return N; -} -template -constexpr auto empty(const C& c) -> decltype(c.empty()) -{ -return c.empty(); -} -template -constexpr bool empty(const T (&)[N]) -{ -return false; -} -template -constexpr bool empty(std::initializer_list il) -{ -return il.size() == 0; -} -template -constexpr auto begin(const C& c) -> decltype(c.begin()) -{ -return c.begin(); -} -template -constexpr auto begin(C& c) -> decltype(c.begin()) -{ -return c.begin(); -} -template -constexpr T* begin(T (&array)[N]) -{ -return &array[0]; -} -template -constexpr const E* begin(std::initializer_list il) -{ -return il.begin(); -} -template -constexpr auto cbegin(const C& c) -> decltype(cx::begin(c)) -{ -return cx::begin(c); -} -template -constexpr auto end(const C& c) -> decltype(c.end()) -{ -return c.end(); -} -template -constexpr auto end(C& c) -> decltype(c.end()) -{ -return c.end(); -} -template -constexpr T* end(T (&array)[N]) -{ -return &array[N]; -} -template -constexpr const E* end(std::initializer_list il) -{ -return il.end(); -} -template -constexpr auto cend(const C& c) -> decltype(cx::end(c)) -{ -return cx::end(c); -} -} -#endif namespace cx { template @@ -443,7 +350,7 @@ while (first1 != last1 && first2 != last2 && *first1 == *first2) return first1 == last1 && first2 == last2; #else return first1 != last1 && first2 != last2 && *first1 == *first2 -? equal(next(first1), last1, next(first2), last2) +? equal(first1 + 1, last1, first2 + 1, last2) : first1 == last1 && first2 == last2; #endif } @@ -576,6 +483,99 @@ return std::forward(lhs) == std::forward(rhs); }; } #endif +#ifndef CX_ITERATOR_HPP +#define CX_ITERATOR_HPP +#include +#include +namespace cx +{ +template +constexpr It next(It it) +{ +return it + 1; +} +template +constexpr It prev(It it) +{ +return it - 1; +} +template +constexpr auto size(const C& c) -> decltype(c.size()) +{ +return c.size(); +} +template +constexpr std::size_t size(const T (&)[N]) +{ +return N; +} +template +constexpr auto empty(const C& c) -> decltype(c.empty()) +{ +return c.empty(); +} +template +constexpr bool empty(const T (&)[N]) +{ +return false; +} +template +constexpr bool empty(std::initializer_list il) +{ +return il.size() == 0; +} +template +constexpr auto begin(const C& c) -> decltype(c.begin()) +{ +return c.begin(); +} +template +constexpr auto begin(C& c) -> decltype(c.begin()) +{ +return c.begin(); +} +template +constexpr T* begin(T (&array)[N]) +{ +return &array[0]; +} +template +constexpr const E* begin(std::initializer_list il) +{ +return il.begin(); +} +template +constexpr auto cbegin(const C& c) -> decltype(cx::begin(c)) +{ +return cx::begin(c); +} +template +constexpr auto end(const C& c) -> decltype(c.end()) +{ +return c.end(); +} +template +constexpr auto end(C& c) -> decltype(c.end()) +{ +return c.end(); +} +template +constexpr T* end(T (&array)[N]) +{ +return &array[N]; +} +template +constexpr const E* end(std::initializer_list il) +{ +return il.end(); +} +template +constexpr auto cend(const C& c) -> decltype(cx::end(c)) +{ +return cx::end(c); +} +} +#endif #ifndef CX_STRING_VIEW_HPP #define CX_STRING_VIEW_HPP #include diff --git a/single_include/wildcards.hpp b/single_include/wildcards.hpp index 45dcf9b..6a59ef6 100644 --- a/single_include/wildcards.hpp +++ b/single_include/wildcards.hpp @@ -1,13 +1,13 @@ // THIS FILE HAS BEEN GENERATED AUTOMATICALLY. DO NOT EDIT DIRECTLY. -// Generated: 2018-04-23 18:35:25.512890420 +// Generated: 2018-04-27 20:08:52.393001353 // Copyright Tomas Zeman 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef WILDCARDS_HPP #define WILDCARDS_HPP -#define WILDCARDS_VERSION_MAJOR 0 -#define WILDCARDS_VERSION_MINOR 2 +#define WILDCARDS_VERSION_MAJOR 1 +#define WILDCARDS_VERSION_MINOR 0 #define WILDCARDS_VERSION_PATCH 0 #ifndef WILDCARDS_CARDS_HPP #define WILDCARDS_CARDS_HPP