Skip to content

Latest commit

 

History

210 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[[https://travis-ci.org/FirstLoveLife/Faiz][file:https://travis-ci.org/FirstLoveLife/Faiz.svg?branch=master]]


* WIP
this project is still working-in-progress
* Different behavior from c++ standard library
** unique_ptr
*** compare functions for array
don't support arrray-compare free functions. IOW, Faiz::unique_ptr doesn't
  support https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons_array.cc
Why? you know, compare array with operator ~</>/<=/>=~...... make no sense at
  all. But why does the standard library support? Because they are ~free
  functions~, rather than friend/member function, and array version of
  `class_unique_ptr<T[], Deleter>` is specializeed template, so it can use
  primary template's free function. How do I disable them? change free functions
  into friend function with ~class totally_ordered~, but ~operator <~ and
  ~operator ==~ are still free functions now.
* Modern stuff
** Catch2
- STATIC_REQUIRE
* TODO
http://blog.nuggetwheat.org/index.php/2015/09/01/why-pointer_traits-was-introduced-in-c11/
- implement list with pointer traits
- use gsl's Expects(preconditions) and Ensures(postconditions)
- use gcc/clang's modules.
- simplify empty base classes once no_unique_address is available on clang.(it
  is available on gcc now though)
- use [[http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0892r2.html][explicit(bool)]] for pair/tuple once it is available.(gcc 9 has this
  feature, but I'm too lazy to compile it myself, clang doesn't work on it yet).
- add `ssize` function http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1227r0.html
- implement useable common_type
**  papers to read
- [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3465.pdf][Adding heterogeneous comparison lookup toassociative containers]]
* Conversion
- ~typename~ or ~class~? use ~class~ for sfinae(template parameter) and nest
  template, otherwise use ~typename~
- Faiz::index for all container indexes/subscripts/sizes, IOW, Don't use unsigned for subscripts, prefer gsl::index
- prefer ~and/or~ to ~&&/||~, preserve ~&&~ for rvalue reference.
- Geneally, I prefer metafunction over free constexpr function, because the
  formmer can do more.
- Prefer ~enable_if~ in function's template parameter variable.
, see also isocpp/CppCoreGuidelines#1115
* Travis-CI
   | os                    | compiler  |
   |-----------------------+-----------|
   | Linux                 | g++-8     |
   | Linux                 | clang++-9 |
   | osx                   | g++-8     |
   | osx                   | Clang++-8 |
   | windows               | MinGw     |
  
* Acknowledgements
I can't finish a project without stealing code around, so here are the main sources of the code that can be found in this projects when I didn't write it by myself:
- A great deal of code originally comes from the libcxx/libstdcxx/cppreference implementation of
  type_traits(rewrite many of them with void_t/detectiom idiom)
- many macros in faiz_fwd.hpp is mainly from [[https://github.com/ericniebler/range-v3][range-v3]] and [[https://github.com/FrankHB/YSLib][yslib]]
- operators.hpp comes from [[https://github.com/taocpp/operators][tao-operators]], but rerwite some of codes with cpp17,
  and remove support for return rvalue reference.
- compressed_pair.hpp is adapted from https://github.com/Morwenn/tight_pair/
- The tests in tests were preliminary tests adapted from libcxx/libstdcxx/tight_pair/tao-operators/range-v3/boost
* used c++2a features
- std::endian
* Papers
- [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0528r2.html][p0528R2 The Curious Case of Padding Bits, Featuring Atomic Compare-and-Exchange]] ---- tight_pair
- [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3974.pdf][N3974 - Polymorphic Deleter for Unique Pointers]] -- unique_ptr

* license
This library includes(and are most modified heavily) third party open source
software components:

- [[https://github.com/llvm-mirror/libcxx][libcxx]] and [[https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3][libstdcxx]](for test files and some traits)
- [[https://github.com/FrankHB/YSLib/][YSLib]]
- [[https://github.com/Morwenn/tight_pair/][tight_pair]](~compressed_pair.hpp~, for [[https://en.cppreference.com/w/cpp/language/ebo][ebco]] and test cases)
- [[https://github.com/ericniebler/range-v3][range-v3]](for utilities like is_swappable and some meta functions), and
- [[https://github.com/catchorg/Catch2][Catch2]](for write test files)
- [[https://www.boost.org/][boost]](esp for boost.pp and boost.boost.predef)
- [[https://github.com/taocpp/operators][tao-operators]](for compare functions, can be replaced with ~three-way comparison~ if it is available.).

All files mentioned below preserve original copyright at topmost

* Who is Faiz?
#+BEGIN_SRC language
Kamen Rider Faiz (仮面ライダーファイズ Kamen Raidā Faizu, Masked Rider Faiz) is the main protagonist of the 2003-2004 Kamen Rider Series installment Kamen Rider 555. Its gear is the first of the Rider Gears seen in the series. Its motif is based on the Greek letter phi (Φ).
#+END_SRC
[[faiz.jpg][faiz.jpg]]

About

No description or website provided.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages