mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
add doc: string tupele support, hash support
This commit is contained in:
parent
4e71ab19c4
commit
794666afac
22 changed files with 1752 additions and 42 deletions
45
source/libs/string/basic_string/std-tuple_element.rst
Normal file
45
source/libs/string/basic_string/std-tuple_element.rst
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-string-basic_string-std-tuple_element:
|
||||
###############################################################################
|
||||
std::tuple_element
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
namespace std {
|
||||
template<std::size_t I, typename T, std::size_t N, typename Traits>
|
||||
struct tuple_element<I, sprout::basic_string<T, N, Traits> >;
|
||||
}
|
||||
|
||||
// syntax
|
||||
std::tuple_element<I, basic_string<T, N, Traits> >::type
|
||||
|
||||
Requires
|
||||
========================================
|
||||
|
||||
| ``I < N``. The program is ill-formed if I is out of bounds.
|
||||
|
||||
Value
|
||||
========================================
|
||||
|
||||
| The type T.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/string.hpp>
|
||||
#include <type_traits>
|
||||
using namespace sprout;
|
||||
|
||||
using type = string<8>;
|
||||
using element_type = std::tuple_element<0, type>::type;
|
||||
static_assert(std::is_same<element_type, char>::value, "tuple element type of string is char.");
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/tuple.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue