From 1c4f04757d31d59ed65a23c456bc226d3a9a3265 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 13 Jul 2015 20:08:55 +0100 Subject: [PATCH] mv the octa directory too --- {octa => ostd}/algorithm.hh | 12 ++-- {octa => ostd}/array.hh | 12 ++-- {octa => ostd}/atomic.hh | 8 +-- {octa => ostd}/format.hh | 12 ++-- {octa => ostd}/functional.hh | 82 ++++++++++++++-------------- {octa => ostd}/initializer_list.hh | 8 +-- {octa => ostd}/internal/hashtable.hh | 14 ++--- {octa => ostd}/internal/tuple.hh | 8 +-- {octa => ostd}/io.hh | 16 +++--- {octa => ostd}/map.hh | 16 +++--- {octa => ostd}/maybe.hh | 16 +++--- {octa => ostd}/memory.hh | 10 ++-- {octa => ostd}/new.hh | 8 +-- {octa => ostd}/platform.hh | 54 +++++++++--------- {octa => ostd}/range.hh | 26 ++++----- {octa => ostd}/set.hh | 16 +++--- {octa => ostd}/stream.hh | 20 +++---- {octa => ostd}/string.hh | 38 ++++++------- {octa => ostd}/tuple.hh | 14 ++--- {octa => ostd}/type_traits.hh | 40 +++++++------- {octa => ostd}/types.hh | 4 +- {octa => ostd}/utility.hh | 8 +-- {octa => ostd}/vector.hh | 16 +++--- src/new.cc | 2 +- tests/array.cc | 4 +- tests/utility.cc | 4 +- tests/vector.cc | 4 +- 27 files changed, 236 insertions(+), 236 deletions(-) rename {octa => ostd}/algorithm.hh (98%) rename {octa => ostd}/array.hh (95%) rename {octa => ostd}/atomic.hh (99%) rename {octa => ostd}/format.hh (99%) rename {octa => ostd}/functional.hh (94%) rename {octa => ostd}/initializer_list.hh (89%) rename {octa => ostd}/internal/hashtable.hh (98%) rename {octa => ostd}/internal/tuple.hh (98%) rename {octa => ostd}/io.hh (96%) rename {octa => ostd}/map.hh (96%) rename {octa => ostd}/maybe.hh (98%) rename {octa => ostd}/memory.hh (99%) rename {octa => ostd}/new.hh (81%) rename {octa => ostd}/platform.hh (68%) rename {octa => ostd}/range.hh (98%) rename {octa => ostd}/set.hh (95%) rename {octa => ostd}/stream.hh (95%) rename {octa => ostd}/string.hh (97%) rename {octa => ostd}/tuple.hh (98%) rename {octa => ostd}/type_traits.hh (97%) rename {octa => ostd}/types.hh (97%) rename {octa => ostd}/utility.hh (98%) rename {octa => ostd}/vector.hh (98%) diff --git a/octa/algorithm.hh b/ostd/algorithm.hh similarity index 98% rename from octa/algorithm.hh rename to ostd/algorithm.hh index 1a26062..3ea5d86 100644 --- a/octa/algorithm.hh +++ b/ostd/algorithm.hh @@ -3,15 +3,15 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_ALGORITHM_HH -#define OCTA_ALGORITHM_HH +#ifndef OSTD_ALGORITHM_HH +#define OSTD_ALGORITHM_HH #include -#include "octa/functional.hh" -#include "octa/range.hh" -#include "octa/utility.hh" -#include "octa/initializer_list.hh" +#include "ostd/functional.hh" +#include "ostd/range.hh" +#include "ostd/utility.hh" +#include "ostd/initializer_list.hh" namespace ostd { diff --git a/octa/array.hh b/ostd/array.hh similarity index 95% rename from octa/array.hh rename to ostd/array.hh index f8ae6cb..fb2d1ae 100644 --- a/octa/array.hh +++ b/ostd/array.hh @@ -3,15 +3,15 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_ARRAY_HH -#define OCTA_ARRAY_HH +#ifndef OSTD_ARRAY_HH +#define OSTD_ARRAY_HH #include -#include "octa/algorithm.hh" -#include "octa/range.hh" -#include "octa/string.hh" -#include "octa/internal/tuple.hh" +#include "ostd/algorithm.hh" +#include "ostd/range.hh" +#include "ostd/string.hh" +#include "ostd/internal/tuple.hh" namespace ostd { diff --git a/octa/atomic.hh b/ostd/atomic.hh similarity index 99% rename from octa/atomic.hh rename to ostd/atomic.hh index 3fb76a9..6a3b7c2 100644 --- a/octa/atomic.hh +++ b/ostd/atomic.hh @@ -3,14 +3,14 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_ATOMIC_HH -#define OCTA_ATOMIC_HH +#ifndef OSTD_ATOMIC_HH +#define OSTD_ATOMIC_HH #include #include -#include "octa/types.hh" -#include "octa/type_traits.hh" +#include "ostd/types.hh" +#include "ostd/type_traits.hh" namespace ostd { diff --git a/octa/format.hh b/ostd/format.hh similarity index 99% rename from octa/format.hh rename to ostd/format.hh index ecba014..3cf0888 100644 --- a/octa/format.hh +++ b/ostd/format.hh @@ -3,18 +3,18 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_FORMAT_HH -#define OCTA_FORMAT_HH +#ifndef OSTD_FORMAT_HH +#define OSTD_FORMAT_HH #include #include #include #include -#include "octa/algorithm.hh" -#include "octa/string.hh" -#include "octa/utility.hh" -#include "octa/internal/tuple.hh" +#include "ostd/algorithm.hh" +#include "ostd/string.hh" +#include "ostd/utility.hh" +#include "ostd/internal/tuple.hh" namespace ostd { diff --git a/octa/functional.hh b/ostd/functional.hh similarity index 94% rename from octa/functional.hh rename to ostd/functional.hh index 3ccbf61..4d67736 100644 --- a/octa/functional.hh +++ b/ostd/functional.hh @@ -3,22 +3,22 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_FUNCTIONAL_HH -#define OCTA_FUNCTIONAL_HH +#ifndef OSTD_FUNCTIONAL_HH +#define OSTD_FUNCTIONAL_HH #include -#include "octa/platform.hh" -#include "octa/new.hh" -#include "octa/memory.hh" -#include "octa/utility.hh" -#include "octa/type_traits.hh" +#include "ostd/platform.hh" +#include "ostd/new.hh" +#include "ostd/memory.hh" +#include "ostd/utility.hh" +#include "ostd/type_traits.hh" namespace ostd { /* basic function objects */ -#define OCTA_DEFINE_BINARY_OP(name, op, RT) \ +#define OSTD_DEFINE_BINARY_OP(name, op, RT) \ template struct name { \ RT operator()(const T &x, const T &y) const { \ return x op y; \ @@ -28,24 +28,24 @@ template struct name { \ using Result = RT; \ }; -OCTA_DEFINE_BINARY_OP(Less, <, bool) -OCTA_DEFINE_BINARY_OP(LessEqual, <=, bool) -OCTA_DEFINE_BINARY_OP(Greater, >, bool) -OCTA_DEFINE_BINARY_OP(GreaterEqual, >=, bool) -OCTA_DEFINE_BINARY_OP(Equal, ==, bool) -OCTA_DEFINE_BINARY_OP(NotEqual, !=, bool) -OCTA_DEFINE_BINARY_OP(LogicalAnd, &&, bool) -OCTA_DEFINE_BINARY_OP(LogicalOr, ||, bool) -OCTA_DEFINE_BINARY_OP(Modulo, %, T) -OCTA_DEFINE_BINARY_OP(Multiply, *, T) -OCTA_DEFINE_BINARY_OP(Divide, /, T) -OCTA_DEFINE_BINARY_OP(Add, +, T) -OCTA_DEFINE_BINARY_OP(Subtract, -, T) -OCTA_DEFINE_BINARY_OP(BitAnd, &, T) -OCTA_DEFINE_BINARY_OP(BitOr, |, T) -OCTA_DEFINE_BINARY_OP(BitXor, ^, T) +OSTD_DEFINE_BINARY_OP(Less, <, bool) +OSTD_DEFINE_BINARY_OP(LessEqual, <=, bool) +OSTD_DEFINE_BINARY_OP(Greater, >, bool) +OSTD_DEFINE_BINARY_OP(GreaterEqual, >=, bool) +OSTD_DEFINE_BINARY_OP(Equal, ==, bool) +OSTD_DEFINE_BINARY_OP(NotEqual, !=, bool) +OSTD_DEFINE_BINARY_OP(LogicalAnd, &&, bool) +OSTD_DEFINE_BINARY_OP(LogicalOr, ||, bool) +OSTD_DEFINE_BINARY_OP(Modulo, %, T) +OSTD_DEFINE_BINARY_OP(Multiply, *, T) +OSTD_DEFINE_BINARY_OP(Divide, /, T) +OSTD_DEFINE_BINARY_OP(Add, +, T) +OSTD_DEFINE_BINARY_OP(Subtract, -, T) +OSTD_DEFINE_BINARY_OP(BitAnd, &, T) +OSTD_DEFINE_BINARY_OP(BitOr, |, T) +OSTD_DEFINE_BINARY_OP(BitXor, ^, T) -#undef OCTA_DEFINE_BINARY_OP +#undef OSTD_DEFINE_BINARY_OP template struct LogicalNot { bool operator()(const T &x) const { return !x; } @@ -164,7 +164,7 @@ namespace detail { }; } -#if OCTA_BYTE_ORDER == OCTA_ENDIAN_LIL +#if OSTD_BYTE_ORDER == OSTD_ENDIAN_LIL template struct FromLilEndian: detail::EndianSame {}; template struct FromBigEndian: EndianSwap {}; #else @@ -197,25 +197,25 @@ namespace detail { }; } -#define OCTA_HASH_BASIC(T) template<> struct ToHash: detail::ToHashBase {}; +#define OSTD_HASH_BASIC(T) template<> struct ToHash: detail::ToHashBase {}; -OCTA_HASH_BASIC(bool) -OCTA_HASH_BASIC(char) -OCTA_HASH_BASIC(short) -OCTA_HASH_BASIC(int) -OCTA_HASH_BASIC(long) +OSTD_HASH_BASIC(bool) +OSTD_HASH_BASIC(char) +OSTD_HASH_BASIC(short) +OSTD_HASH_BASIC(int) +OSTD_HASH_BASIC(long) -OCTA_HASH_BASIC(sbyte) -OCTA_HASH_BASIC(byte) -OCTA_HASH_BASIC(ushort) -OCTA_HASH_BASIC(uint) -OCTA_HASH_BASIC(ulong) +OSTD_HASH_BASIC(sbyte) +OSTD_HASH_BASIC(byte) +OSTD_HASH_BASIC(ushort) +OSTD_HASH_BASIC(uint) +OSTD_HASH_BASIC(ulong) -OCTA_HASH_BASIC(Char16) -OCTA_HASH_BASIC(Char32) -OCTA_HASH_BASIC(Wchar) +OSTD_HASH_BASIC(Char16) +OSTD_HASH_BASIC(Char32) +OSTD_HASH_BASIC(Wchar) -#undef OCTA_HASH_BASIC +#undef OSTD_HASH_BASIC namespace detail { inline Size mem_hash(const void *p, Size l) { diff --git a/octa/initializer_list.hh b/ostd/initializer_list.hh similarity index 89% rename from octa/initializer_list.hh rename to ostd/initializer_list.hh index 14ee683..68835ce 100644 --- a/octa/initializer_list.hh +++ b/ostd/initializer_list.hh @@ -3,14 +3,14 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_INITIALIZER_LIST_HH -#define OCTA_INITIALIZER_LIST_HH +#ifndef OSTD_INITIALIZER_LIST_HH +#define OSTD_INITIALIZER_LIST_HH #include -#include "octa/range.hh" +#include "ostd/range.hh" -#ifndef OCTA_ALLOW_CXXSTD +#ifndef OSTD_ALLOW_CXXSTD /* must be in std namespace otherwise the compiler won't know about it */ namespace std { diff --git a/octa/internal/hashtable.hh b/ostd/internal/hashtable.hh similarity index 98% rename from octa/internal/hashtable.hh rename to ostd/internal/hashtable.hh index 89af7ae..71dd69a 100644 --- a/octa/internal/hashtable.hh +++ b/ostd/internal/hashtable.hh @@ -3,16 +3,16 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_INTERNAL_HASHTABLE_HH -#define OCTA_INTERNAL_HASHTABLE_HH +#ifndef OSTD_INTERNAL_HASHTABLE_HH +#define OSTD_INTERNAL_HASHTABLE_HH #include -#include "octa/types.hh" -#include "octa/utility.hh" -#include "octa/memory.hh" -#include "octa/range.hh" -#include "octa/initializer_list.hh" +#include "ostd/types.hh" +#include "ostd/utility.hh" +#include "ostd/memory.hh" +#include "ostd/range.hh" +#include "ostd/initializer_list.hh" namespace ostd { diff --git a/octa/internal/tuple.hh b/ostd/internal/tuple.hh similarity index 98% rename from octa/internal/tuple.hh rename to ostd/internal/tuple.hh index bc118a7..0feb8e1 100644 --- a/octa/internal/tuple.hh +++ b/ostd/internal/tuple.hh @@ -4,11 +4,11 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_INTERNAL_TUPLE_HH -#define OCTA_INTERNAL_TUPLE_HH +#ifndef OSTD_INTERNAL_TUPLE_HH +#define OSTD_INTERNAL_TUPLE_HH -#include "octa/types.hh" -#include "octa/type_traits.hh" +#include "ostd/types.hh" +#include "ostd/type_traits.hh" namespace ostd { diff --git a/octa/io.hh b/ostd/io.hh similarity index 96% rename from octa/io.hh rename to ostd/io.hh index f28a330..891489c 100644 --- a/octa/io.hh +++ b/ostd/io.hh @@ -3,15 +3,15 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_IO_HH -#define OCTA_IO_HH +#ifndef OSTD_IO_HH +#define OSTD_IO_HH #include -#include "octa/platform.hh" -#include "octa/string.hh" -#include "octa/stream.hh" -#include "octa/format.hh" +#include "ostd/platform.hh" +#include "ostd/string.hh" +#include "ostd/stream.hh" +#include "ostd/format.hh" namespace ostd { @@ -87,7 +87,7 @@ struct FileStream: Stream { } bool seek(StreamOffset pos, StreamSeek whence = StreamSeek::set) { -#ifndef OCTA_PLATFORM_WIN32 +#ifndef OSTD_PLATFORM_WIN32 return fseeko(p_f, pos, int(whence)) >= 0; #else return _fseeki64(p_f, pos, int(whence)) >= 0; @@ -95,7 +95,7 @@ struct FileStream: Stream { } StreamOffset tell() const { -#ifndef OCTA_PLATFORM_WIN32 +#ifndef OSTD_PLATFORM_WIN32 return ftello(p_f); #else return _ftelli64(p_f); diff --git a/octa/map.hh b/ostd/map.hh similarity index 96% rename from octa/map.hh rename to ostd/map.hh index c692b56..ad9dd92 100644 --- a/octa/map.hh +++ b/ostd/map.hh @@ -3,16 +3,16 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_MAP_HH -#define OCTA_MAP_HH +#ifndef OSTD_MAP_HH +#define OSTD_MAP_HH -#include "octa/types.hh" -#include "octa/utility.hh" -#include "octa/memory.hh" -#include "octa/functional.hh" -#include "octa/initializer_list.hh" +#include "ostd/types.hh" +#include "ostd/utility.hh" +#include "ostd/memory.hh" +#include "ostd/functional.hh" +#include "ostd/initializer_list.hh" -#include "octa/internal/hashtable.hh" +#include "ostd/internal/hashtable.hh" namespace ostd { diff --git a/octa/maybe.hh b/ostd/maybe.hh similarity index 98% rename from octa/maybe.hh rename to ostd/maybe.hh index 1d8240d..a92142d 100644 --- a/octa/maybe.hh +++ b/ostd/maybe.hh @@ -3,15 +3,15 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_MAYBE_HH -#define OCTA_MAYBE_HH +#ifndef OSTD_MAYBE_HH +#define OSTD_MAYBE_HH -#include "octa/types.hh" -#include "octa/type_traits.hh" -#include "octa/memory.hh" -#include "octa/utility.hh" -#include "octa/initializer_list.hh" -#include "octa/functional.hh" +#include "ostd/types.hh" +#include "ostd/type_traits.hh" +#include "ostd/memory.hh" +#include "ostd/utility.hh" +#include "ostd/initializer_list.hh" +#include "ostd/functional.hh" namespace ostd { diff --git a/octa/memory.hh b/ostd/memory.hh similarity index 99% rename from octa/memory.hh rename to ostd/memory.hh index 67dc804..a82eeba 100644 --- a/octa/memory.hh +++ b/ostd/memory.hh @@ -3,14 +3,14 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_MEMORY_HH -#define OCTA_MEMORY_HH +#ifndef OSTD_MEMORY_HH +#define OSTD_MEMORY_HH #include -#include "octa/new.hh" -#include "octa/utility.hh" -#include "octa/type_traits.hh" +#include "ostd/new.hh" +#include "ostd/utility.hh" +#include "ostd/type_traits.hh" namespace ostd { /* address of */ diff --git a/octa/new.hh b/ostd/new.hh similarity index 81% rename from octa/new.hh rename to ostd/new.hh index 9a561a5..6e0d306 100644 --- a/octa/new.hh +++ b/ostd/new.hh @@ -3,11 +3,11 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_NEW_HH -#define OCTA_NEW_HH +#ifndef OSTD_NEW_HH +#define OSTD_NEW_HH -#ifndef OCTA_ALLOW_CXXSTD -#include "octa/types.hh" +#ifndef OSTD_ALLOW_CXXSTD +#include "ostd/types.hh" inline void *operator new (ostd::Size, void *p) { return p; } inline void *operator new [](ostd::Size, void *p) { return p; } diff --git a/octa/platform.hh b/ostd/platform.hh similarity index 68% rename from octa/platform.hh rename to ostd/platform.hh index 8c11bbf..9b2153a 100644 --- a/octa/platform.hh +++ b/ostd/platform.hh @@ -3,77 +3,77 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_PLATFORM_HH -#define OCTA_PLATFORM_HH +#ifndef OSTD_PLATFORM_HH +#define OSTD_PLATFORM_HH #include #if defined(WIN32) || defined(_WIN32) || (defined(__WIN32) && !defined(__CYGWIN__)) -# define OCTA_PLATFORM_WIN32 1 +# define OSTD_PLATFORM_WIN32 1 # if defined(WIN64) || defined(_WIN64) -# define OCTA_PLATFORM_WIN64 1 +# define OSTD_PLATFORM_WIN64 1 # endif #else -# define OCTA_PLATFORM_POSIX 1 +# define OSTD_PLATFORM_POSIX 1 # if defined(__linux__) -# define OCTA_PLATFORM_LINUX 1 +# define OSTD_PLATFORM_LINUX 1 # endif # if defined(__APPLE__) -# define OCTA_PLATFORM_OSX 1 +# define OSTD_PLATFORM_OSX 1 # endif # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -# define OCTA_PLATFORM_FREEBSD 1 -# define OCTA_PLATFORM_BSD 1 +# define OSTD_PLATFORM_FREEBSD 1 +# define OSTD_PLATFORM_BSD 1 # endif # if defined(__NetBSD__) -# define OCTA_PLATFORM_NETBSD 1 -# define OCTA_PLATFORM_BSD 1 +# define OSTD_PLATFORM_NETBSD 1 +# define OSTD_PLATFORM_BSD 1 # endif # if defined(__OpenBSD__) -# define OCTA_PLATFORM_OPENBSD 1 -# define OCTA_PLATFORM_BSD 1 +# define OSTD_PLATFORM_OPENBSD 1 +# define OSTD_PLATFORM_BSD 1 # endif # if defined(__DragonFly__) -# define OCTA_PLATFORM_DRAGONFLYBSD 1 -# define OCTA_PLATFORM_BSD 1 +# define OSTD_PLATFORM_DRAGONFLYBSD 1 +# define OSTD_PLATFORM_BSD 1 # endif # if defined(sun) || defined(__sun) -# define OCTA_PLATFORM_SOLARIS 1 +# define OSTD_PLATFORM_SOLARIS 1 # endif #endif #if defined(__clang__) -# define OCTA_TOOLCHAIN_CLANG 1 +# define OSTD_TOOLCHAIN_CLANG 1 #endif #if defined(__GNUC__) -# define OCTA_TOOLCHAIN_GNU 1 +# define OSTD_TOOLCHAIN_GNU 1 #endif #if defined(_MSC_VER) -# define OCTA_TOOLCHAIN_MSVC 1 +# define OSTD_TOOLCHAIN_MSVC 1 #endif -#define OCTA_ENDIAN_LIL 1234 -#define OCTA_ENDIAN_BIG 4321 +#define OSTD_ENDIAN_LIL 1234 +#define OSTD_ENDIAN_BIG 4321 -#ifdef OCTA_PLATFORM_LINUX +#ifdef OSTD_PLATFORM_LINUX # include -# define OCTA_BYTE_ORDER __BYTE_ORDER +# define OSTD_BYTE_ORDER __BYTE_ORDER #else # if defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || \ defined(__AARCH64EB__) || defined(__MIPSEB__) || defined(__MIPSEB) || \ defined(_MIPSEB) || defined(__ppc__) || defined(__POWERPC__) || \ defined(_M_PPC) || defined(__sparc__) -# define OCTA_BYTE_ORDER OCTA_ENDIAN_BIG +# define OSTD_BYTE_ORDER OSTD_ENDIAN_BIG # else -# define OCTA_BYTE_ORDER OCTA_ENDIAN_LIL +# define OSTD_BYTE_ORDER OSTD_ENDIAN_LIL # endif #endif namespace ostd { -#if defined(OCTA_TOOLCHAIN_GNU) +#if defined(OSTD_TOOLCHAIN_GNU) /* using gcc/clang builtins */ inline uint16_t endian_swap16(uint16_t x) { @@ -86,7 +86,7 @@ inline uint64_t endian_swap64(uint64_t x) { return __builtin_bswap64(x); } -#elif defined(OCTA_TOOLCHAIN_MSVC) +#elif defined(OSTD_TOOLCHAIN_MSVC) /* using msvc builtins */ inline uint16_t endian_swap16(uint16_t x) { diff --git a/octa/range.hh b/ostd/range.hh similarity index 98% rename from octa/range.hh rename to ostd/range.hh index f9c9ed0..cb50d04 100644 --- a/octa/range.hh +++ b/ostd/range.hh @@ -3,16 +3,16 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_RANGE_HH -#define OCTA_RANGE_HH +#ifndef OSTD_RANGE_HH +#define OSTD_RANGE_HH #include #include -#include "octa/new.hh" -#include "octa/types.hh" -#include "octa/utility.hh" -#include "octa/type_traits.hh" +#include "ostd/new.hh" +#include "ostd/types.hh" +#include "ostd/utility.hh" +#include "ostd/type_traits.hh" namespace ostd { @@ -25,7 +25,7 @@ struct FiniteRandomAccessRangeTag: RandomAccessRangeTag {}; template struct RangeHalf; -#define OCTA_RANGE_TRAIT(Name) \ +#define OSTD_RANGE_TRAIT(Name) \ namespace detail { \ template \ struct Range##Name##Test { \ @@ -43,13 +43,13 @@ namespace detail { \ template \ using Range##Name = typename detail::Range##Name##Base::Type; -OCTA_RANGE_TRAIT(Category) -OCTA_RANGE_TRAIT(Size) -OCTA_RANGE_TRAIT(Value) -OCTA_RANGE_TRAIT(Reference) -OCTA_RANGE_TRAIT(Difference) +OSTD_RANGE_TRAIT(Category) +OSTD_RANGE_TRAIT(Size) +OSTD_RANGE_TRAIT(Value) +OSTD_RANGE_TRAIT(Reference) +OSTD_RANGE_TRAIT(Difference) -#undef OCTA_RANGE_TRAIT +#undef OSTD_RANGE_TRAIT namespace detail { template diff --git a/octa/set.hh b/ostd/set.hh similarity index 95% rename from octa/set.hh rename to ostd/set.hh index 7a422b1..786756e 100644 --- a/octa/set.hh +++ b/ostd/set.hh @@ -3,16 +3,16 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_SET_HH -#define OCTA_SET_HH +#ifndef OSTD_SET_HH +#define OSTD_SET_HH -#include "octa/types.hh" -#include "octa/utility.hh" -#include "octa/memory.hh" -#include "octa/functional.hh" -#include "octa/initializer_list.hh" +#include "ostd/types.hh" +#include "ostd/utility.hh" +#include "ostd/memory.hh" +#include "ostd/functional.hh" +#include "ostd/initializer_list.hh" -#include "octa/internal/hashtable.hh" +#include "ostd/internal/hashtable.hh" namespace ostd { diff --git a/octa/stream.hh b/ostd/stream.hh similarity index 95% rename from octa/stream.hh rename to ostd/stream.hh index c88fcb1..b655bad 100644 --- a/octa/stream.hh +++ b/ostd/stream.hh @@ -3,22 +3,22 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_STREAM_HH -#define OCTA_STREAM_HH +#ifndef OSTD_STREAM_HH +#define OSTD_STREAM_HH #include -#include "octa/platform.hh" -#include "octa/types.hh" -#include "octa/range.hh" -#include "octa/type_traits.hh" -#include "octa/string.hh" -#include "octa/utility.hh" -#include "octa/format.hh" +#include "ostd/platform.hh" +#include "ostd/types.hh" +#include "ostd/range.hh" +#include "ostd/type_traits.hh" +#include "ostd/string.hh" +#include "ostd/utility.hh" +#include "ostd/format.hh" namespace ostd { -#ifndef OCTA_PLATFORM_WIN32 +#ifndef OSTD_PLATFORM_WIN32 using StreamOffset = off_t; #else using StreamOffset = __int64; diff --git a/octa/string.hh b/ostd/string.hh similarity index 97% rename from octa/string.hh rename to ostd/string.hh index 8834c5c..5fefb67 100644 --- a/octa/string.hh +++ b/ostd/string.hh @@ -3,15 +3,15 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_STRING_HH -#define OCTA_STRING_HH +#ifndef OSTD_STRING_HH +#define OSTD_STRING_HH #include #include -#include "octa/utility.hh" -#include "octa/range.hh" -#include "octa/vector.hh" +#include "ostd/utility.hh" +#include "ostd/range.hh" +#include "ostd/vector.hh" namespace ostd { static constexpr Size npos = -1; @@ -729,7 +729,7 @@ template<> struct ToString { } }; -#define OCTA_TOSTR_NUM(T, fmt) \ +#define OSTD_TOSTR_NUM(T, fmt) \ template<> struct ToString { \ using Argument = T; \ using Result = String; \ @@ -740,21 +740,21 @@ template<> struct ToString { \ } \ }; -OCTA_TOSTR_NUM(sbyte, "%d") -OCTA_TOSTR_NUM(int, "%d") -OCTA_TOSTR_NUM(int &, "%d") -OCTA_TOSTR_NUM(long, "%ld") -OCTA_TOSTR_NUM(float, "%f") -OCTA_TOSTR_NUM(double, "%f") +OSTD_TOSTR_NUM(sbyte, "%d") +OSTD_TOSTR_NUM(int, "%d") +OSTD_TOSTR_NUM(int &, "%d") +OSTD_TOSTR_NUM(long, "%ld") +OSTD_TOSTR_NUM(float, "%f") +OSTD_TOSTR_NUM(double, "%f") -OCTA_TOSTR_NUM(byte, "%u") -OCTA_TOSTR_NUM(uint, "%u") -OCTA_TOSTR_NUM(ulong, "%lu") -OCTA_TOSTR_NUM(llong, "%lld") -OCTA_TOSTR_NUM(ullong, "%llu") -OCTA_TOSTR_NUM(ldouble, "%Lf") +OSTD_TOSTR_NUM(byte, "%u") +OSTD_TOSTR_NUM(uint, "%u") +OSTD_TOSTR_NUM(ulong, "%lu") +OSTD_TOSTR_NUM(llong, "%lld") +OSTD_TOSTR_NUM(ullong, "%llu") +OSTD_TOSTR_NUM(ldouble, "%Lf") -#undef OCTA_TOSTR_NUM +#undef OSTD_TOSTR_NUM template struct ToString { using Argument = T *; diff --git a/octa/tuple.hh b/ostd/tuple.hh similarity index 98% rename from octa/tuple.hh rename to ostd/tuple.hh index 4a57dc2..579b2be 100644 --- a/octa/tuple.hh +++ b/ostd/tuple.hh @@ -3,15 +3,15 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_TUPLE_HH -#define OCTA_TUPLE_HH +#ifndef OSTD_TUPLE_HH +#define OSTD_TUPLE_HH -#include "octa/internal/tuple.hh" +#include "ostd/internal/tuple.hh" -#include "octa/types.hh" -#include "octa/type_traits.hh" -#include "octa/memory.hh" -#include "octa/utility.hh" +#include "ostd/types.hh" +#include "ostd/type_traits.hh" +#include "ostd/memory.hh" +#include "ostd/utility.hh" namespace ostd { diff --git a/octa/type_traits.hh b/ostd/type_traits.hh similarity index 97% rename from octa/type_traits.hh rename to ostd/type_traits.hh index 3285284..83fd9f3 100644 --- a/octa/type_traits.hh +++ b/ostd/type_traits.hh @@ -3,12 +3,12 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_TYPE_TRAITS_HH -#define OCTA_TYPE_TRAITS_HH +#ifndef OSTD_TYPE_TRAITS_HH +#define OSTD_TYPE_TRAITS_HH #include -#include "octa/types.hh" +#include "ostd/types.hh" namespace ostd { /* forward declarations */ @@ -403,16 +403,16 @@ struct HasVirtualDestructor: IntegralConstant &&>(v) +#define OSTD_MOVE(v) static_cast &&>(v) template struct Select2nd { using Type = T; }; struct Any { Any(...); }; template typename Select2nd< - decltype(OCTA_MOVE(T(declval_in()...))), True + decltype(OSTD_MOVE(T(declval_in()...))), True >::Type is_ctible_test(T &&, A &&...); -#undef OCTA_MOVE +#undef OSTD_MOVE template False is_ctible_test(Any, A &&...); @@ -1069,35 +1069,35 @@ using Conditional = typename detail::ConditionalBase<_cond, T, U>::Type; /* result of call at compile time */ namespace detail { -#define OCTA_FWD(T, _v) static_cast(_v) +#define OSTD_FWD(T, _v) static_cast(_v) template inline auto rof_invoke(F &&f, A &&...args) -> - decltype(OCTA_FWD(F, f)(OCTA_FWD(A, args)...)) { - return OCTA_FWD(F, f)(OCTA_FWD(A, args)...); + decltype(OSTD_FWD(F, f)(OSTD_FWD(A, args)...)) { + return OSTD_FWD(F, f)(OSTD_FWD(A, args)...); } template inline auto rof_invoke(T B::*pmd, D &&ref) -> - decltype(OCTA_FWD(D, ref).*pmd) { - return OCTA_FWD(D, ref).*pmd; + decltype(OSTD_FWD(D, ref).*pmd) { + return OSTD_FWD(D, ref).*pmd; } template inline auto rof_invoke(PMD &&pmd, P &&ptr) -> - decltype((*OCTA_FWD(P, ptr)).*OCTA_FWD(PMD, pmd)) { - return (*OCTA_FWD(P, ptr)).*OCTA_FWD(PMD, pmd); + decltype((*OSTD_FWD(P, ptr)).*OSTD_FWD(PMD, pmd)) { + return (*OSTD_FWD(P, ptr)).*OSTD_FWD(PMD, pmd); } template inline auto rof_invoke(T B::*pmf, D &&ref, A &&...args) -> - decltype((OCTA_FWD(D, ref).*pmf)(OCTA_FWD(A, args)...)) { - return (OCTA_FWD(D, ref).*pmf)(OCTA_FWD(A, args)...); + decltype((OSTD_FWD(D, ref).*pmf)(OSTD_FWD(A, args)...)) { + return (OSTD_FWD(D, ref).*pmf)(OSTD_FWD(A, args)...); } template inline auto rof_invoke(PMF &&pmf, P &&ptr, A &&...args) -> - decltype(((*OCTA_FWD(P, ptr)).*OCTA_FWD(PMF, pmf)) - (OCTA_FWD(A, args)...)) { - return ((*OCTA_FWD(P, ptr)).*OCTA_FWD(PMF, pmf)) - (OCTA_FWD(A, args)...); + decltype(((*OSTD_FWD(P, ptr)).*OSTD_FWD(PMF, pmf)) + (OSTD_FWD(A, args)...)) { + return ((*OSTD_FWD(P, ptr)).*OSTD_FWD(PMF, pmf)) + (OSTD_FWD(A, args)...); } -#undef OCTA_FWD +#undef OSTD_FWD template struct ResultOfCore {}; diff --git a/octa/types.hh b/ostd/types.hh similarity index 97% rename from octa/types.hh rename to ostd/types.hh index 058b88c..8ba0373 100644 --- a/octa/types.hh +++ b/ostd/types.hh @@ -3,8 +3,8 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_TYPES_HH -#define OCTA_TYPES_HH +#ifndef OSTD_TYPES_HH +#define OSTD_TYPES_HH #include #include diff --git a/octa/utility.hh b/ostd/utility.hh similarity index 98% rename from octa/utility.hh rename to ostd/utility.hh index fb5bf2f..623f43c 100644 --- a/octa/utility.hh +++ b/ostd/utility.hh @@ -3,13 +3,13 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_UTILITY_HH -#define OCTA_UTILITY_HH +#ifndef OSTD_UTILITY_HH +#define OSTD_UTILITY_HH #include -#include "octa/type_traits.hh" -#include "octa/internal/tuple.hh" +#include "ostd/type_traits.hh" +#include "ostd/internal/tuple.hh" namespace ostd { diff --git a/octa/vector.hh b/ostd/vector.hh similarity index 98% rename from octa/vector.hh rename to ostd/vector.hh index fa5e855..c2a7f78 100644 --- a/octa/vector.hh +++ b/ostd/vector.hh @@ -3,18 +3,18 @@ * This file is part of OctaSTD. See COPYING.md for futher information. */ -#ifndef OCTA_VECTOR_HH -#define OCTA_VECTOR_HH +#ifndef OSTD_VECTOR_HH +#define OSTD_VECTOR_HH #include #include -#include "octa/type_traits.hh" -#include "octa/utility.hh" -#include "octa/range.hh" -#include "octa/algorithm.hh" -#include "octa/initializer_list.hh" -#include "octa/memory.hh" +#include "ostd/type_traits.hh" +#include "ostd/utility.hh" +#include "ostd/range.hh" +#include "ostd/algorithm.hh" +#include "ostd/initializer_list.hh" +#include "ostd/memory.hh" namespace ostd { diff --git a/src/new.cc b/src/new.cc index b8c71ef..f269d29 100644 --- a/src/new.cc +++ b/src/new.cc @@ -5,7 +5,7 @@ #include -#include "octa/types.hh" +#include "ostd/types.hh" void *operator new(ostd::Size size) { void *p = malloc(size); diff --git a/tests/array.cc b/tests/array.cc index b807b73..694850b 100644 --- a/tests/array.cc +++ b/tests/array.cc @@ -1,7 +1,7 @@ #include #include -#include "octa/array.hh" -#include "octa/string.hh" +#include "ostd/array.hh" +#include "ostd/string.hh" using namespace ostd; diff --git a/tests/utility.cc b/tests/utility.cc index 3d1e302..35de0bd 100644 --- a/tests/utility.cc +++ b/tests/utility.cc @@ -1,7 +1,7 @@ #include #include -#include "octa/utility.hh" -#include "octa/string.hh" +#include "ostd/utility.hh" +#include "ostd/string.hh" using namespace ostd; diff --git a/tests/vector.cc b/tests/vector.cc index 59ff146..ee1765b 100644 --- a/tests/vector.cc +++ b/tests/vector.cc @@ -1,7 +1,7 @@ #include #include -#include "octa/vector.hh" -#include "octa/string.hh" +#include "ostd/vector.hh" +#include "ostd/string.hh" using namespace ostd;