libostd/README.md

78 lines
3.3 KiB
Markdown
Raw Normal View History

2015-04-04 21:12:10 +02:00
# octastd
2015-04-06 00:10:44 +02:00
2016-01-29 23:00:00 +01:00
OctaSTD is a new "standard library" for C++14. It provides containers
(dynamic arrays etc) as well as other utilities.
2015-04-23 19:47:33 +02:00
2015-05-18 03:13:16 +02:00
Documentation for OctaSTD can be found at https://wiki.octaforge.org/docs/octastd.
2016-01-12 19:33:46 +01:00
Full C++14 support is required in your compiler.
2015-04-23 19:47:33 +02:00
## Supported compilers
Compiler | Version
-------- | -------
gcc/g++ | 5.4+, 6+
clang | 3.8+ (most platforms including LLVM for macOS), 8.0.0+ (macOS Xcode)
2015-04-23 19:47:33 +02:00
2016-01-12 19:33:46 +01:00
Other C++14 compliant compilers might work as well. OctaSTD does not utilize
2015-04-23 19:47:33 +02:00
compiler specific extensions except certain builtin type traits - to implement
traits that are not normally possible to implement without compiler support.
OctaSTD does not provide fallbacks for those traits. The compiler is expected
2015-05-06 20:54:20 +02:00
to support these builtins. So far the 2 above-mentioned compilers support them
(MSVC++ supports most of these as well).
2016-01-12 19:33:46 +01:00
While Clang 3.6 does implement a sufficient level of C++14 support, it suffers
2016-07-08 20:53:40 +02:00
from a bug in its variable template implementation that prevents OctaSTD from
2016-01-12 19:33:46 +01:00
functioning. Therefore version 3.8 or higher is necessary (where this bug was
finally fixed).
GCC has implemented a sufficient feature level of C++14 since version 5.1, but
2016-07-08 20:53:40 +02:00
also is too buggy until version 5.4. Version 5.1 and 5.2 have variable template
partial specialization issues and version 5.3 has an internal compiler error
triggered by the tuple implementation. Version 5.4 appears to be the first one
to compile this without issues. GCC 6.1 also appears to compile without problems.
2016-07-08 20:53:40 +02:00
MSVC++ is currently unsupported. Support is currently being investigated and
might be added at least for VS 2015 Update 2, assuming I don't run into any
significant bugs or missing features. MSVC++ with Clang frontend will be
supported once Microsoft updates it to Clang 3.8 (3.7 as is currently shipped
suffers from the issue mentioned above).
2015-09-09 20:51:33 +02:00
## Supported operating systems
Currently supported OSes in OctaSTD are Linux, FreeBSD and macOS. Other
2015-09-09 20:51:33 +02:00
systems that implement POSIX API will also work (if they don't, bug reports
are welcome).
MacOS support requires Xcode 8 or newer to work (or alternatively, official
LLVM distribution for macOS or any supported compiler from other channels
such as Homebrew). That is the first version to ship a Clang 3.8 based
toolchain, so things will not compile with an older version of Xcode.
2016-07-08 20:53:40 +02:00
Windows is supported with GCC (MinGW) and Clang. The MS C runtime is supported
as well, so compiling with Clang targeting MSVC compatibility will work.
2016-09-11 21:17:49 +02:00
## Exceptions
The library is written with the idea that no API in it ever throws exceptions (with
possibly some rare... exceptions ;)). However, this does not mean it cannot be used
in code that utilizes exceptions. Because of this, the library attempts to provide
some degree of exception safety as well as proper `noexcept` annotations. It also
provides type traits to check things such as whether something can be constructed
or assigned to without throwing.
This is currently a work in progress though. Here is a list of files where things
have been correctly annotated:
* array.hh
* initializer_list.hh
* memory.hh
* new.hh
* platform.hh
* utility.hh
* type_traits.hh
This list will expand over time. As for exception safety of containers, it's is
currently not done/checked. They will be made exception safe over time too.