diff --git a/docs/_sources/libs/libraries.txt b/docs/_sources/libs/libraries.txt index 8ed1f31e..8c55cbc1 100644 --- a/docs/_sources/libs/libraries.txt +++ b/docs/_sources/libs/libraries.txt @@ -6,8 +6,17 @@ Libraries .. toctree:: :hidden: + sprout/array/index sprout/algorithm/index +.. _sprout-listed_by_alphabetically: +******************************************************************************* +Libraries Listed Alphabetically +******************************************************************************* + +* :doc:`algorithm <./sprout/algorithm/index>` - STL like generic algorithms. +* :doc:`array <./sprout/array/index>` - STL compliant class template for storing fixed-size sequences of objects. + .. _sprout-listed_by_category: ******************************************************************************* Libraries Listed by Category @@ -17,11 +26,13 @@ Libraries Listed by Category Containers and Data structures ======================================= +* :doc:`array <./sprout/array/index>` - STL compliant class template for storing fixed-size sequences of objects. + .. _sprout-listed_by_category-algorithms: Algorithms ======================================= -* :doc:`algorithm <./sprout/algorithm/index>` - STL-like generic algorithms. +* :doc:`algorithm <./sprout/algorithm/index>` - STL like generic algorithms. .. _sprout-listed_by_category-algorithms: Algorithms diff --git a/docs/_sources/libs/sprout/algorithm/index.txt b/docs/_sources/libs/sprout/algorithm/index.txt index ed5335da..02f0c980 100644 --- a/docs/_sources/libs/sprout/algorithm/index.txt +++ b/docs/_sources/libs/sprout/algorithm/index.txt @@ -16,11 +16,13 @@ Sprout.Algorithm Non-modifying sequence operations ******************************************************************************* -* :doc:`./all_of` +* :doc:`all_of <./all_of>` +* :doc:`any_of <./any_of>` +* :doc:`none_of <./none_of>` +* :doc:`one_of <./one_of>` -* :doc:`./any_of` +Header +======================================== -* :doc:`./none_of` - -* :doc:`./one_of` +``sprout/algorithm.hpp`` diff --git a/docs/_sources/libs/sprout/array/array/index.txt b/docs/_sources/libs/sprout/array/array/index.txt new file mode 100644 index 00000000..9fcce8af --- /dev/null +++ b/docs/_sources/libs/sprout/array/array/index.txt @@ -0,0 +1,138 @@ +.. _sprout-array-array: +############################################################################### +Class template array +############################################################################### + +.. toctree:: + :hidden: + +Interface +======================================== +.. sourcecode:: c++ + + template + class array { + // types: + typedef T& reference; + typedef T const& const_reference; + typedef /*implementation-defined*/ iterator; + typedef /*implementation-defined*/ const_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef T const* const_pointer; + typedef sprout::reverse_iterator reverse_iterator; + typedef sprout::reverse_iterator const_reverse_iterator; + + // constants: + SPROUT_STATIC_CONSTEXPR size_type static_size = N; + + T elems[N ? N : 1]; // exposition only + + // construct/copy/destroy: + template + array& operator=(array const& rhs); + template + array& operator=(array&& rhs); + + // modifiers: + void fill(const_reference u); + SPROUT_CONSTEXPR array fill(const_reference value) const; + void assign(const_reference value); + SPROUT_CONSTEXPR array assign(const_reference value) const; + void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval(), std::declval()))); + + // iterators: + iterator begin() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT; + iterator end() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT; + reverse_iterator rbegin() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT; + reverse_iterator rend() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT; + + // capacity: + SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT; + + // element access: + reference operator[](size_type n); + SPROUT_CONSTEXPR const_reference operator[](size_type n) const; + reference at(size_type n); + SPROUT_CONSTEXPR const_reference at(size_type n) const; + reference front(); + SPROUT_CONSTEXPR const_reference front() const; + reference back(); + SPROUT_CONSTEXPR const_reference back() const; + pointer data() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT; + pointer c_array() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT; + }; + + +Description +======================================== + +Member functions +---------------------------------------- + +(initializer) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`(initializer) <./array/initializer->` + +construct/copy/destroy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`operator= <./array/operator-assign>` + +modifiers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`fill <./array/fill>` +* :doc:`assign <./array/assign>` + +iterators +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`begin <./array/begin>` +* :doc:`end <./array/end>` +* :doc:`rbegin <./array/rbegin>` +* :doc:`rend <./array/rend>` +* :doc:`cbegin <./array/cbegin>` +* :doc:`cend <./array/cend>` +* :doc:`crbegin <./array/crbegin>` +* :doc:`crend <./array/crend>` + +capacity +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`size <./array/size>` +* :doc:`max_size <./array/max_size>` +* :doc:`empty <./array/empty>` + +element access +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`operator[] <./array/operator-subscript>` +* :doc:`at <./array/at>` +* :doc:`front <./array/front>` +* :doc:`back <./array/back>` +* :doc:`data <./array/data>` +* :doc:`c_array <./array/c_array>` + +Header +======================================== + +``sprout/array/array.hpp`` + +Convenience header: ``sprout/array.hpp`` + diff --git a/docs/_sources/libs/sprout/array/index.txt b/docs/_sources/libs/sprout/array/index.txt new file mode 100644 index 00000000..096493bf --- /dev/null +++ b/docs/_sources/libs/sprout/array/index.txt @@ -0,0 +1,39 @@ +.. _sprout-array: +############################################################################### +Sprout.Array +############################################################################### + +.. toctree:: + :hidden: + + array/index + +Interface +======================================== +.. sourcecode:: c++ + + template + class array; + + template + inline void swap(sprout::array& lhs, sprout::array& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))); + + template + inline SPROUT_CONSTEXPR sprout::array to_array(T const (& arr)[N]); + +Classes +======================================== + +* :doc:`array <./array/index>` + +Non-member functions +======================================== + +* :doc:`swap <./swap>` +* :doc:`to_array <./to_array>` + +Header +======================================== + +``sprout/array.hpp`` + diff --git a/docs/libs/libraries.html b/docs/libs/libraries.html index 5a604ffb..dbd5b26d 100644 --- a/docs/libs/libraries.html +++ b/docs/libs/libraries.html @@ -21,7 +21,7 @@ - + @@ -32,7 +32,7 @@ index
  • - next |
  • Libraries

    +
    +

    Libraries Listed Alphabetically

    +
      +
    • algorithm - STL like generic algorithms.
    • +
    • array - STL compliant class template for storing fixed-size sequences of objects.
    • +
    +

    Libraries Listed by Category

    Containers and Data structures

    +
      +
    • array - STL compliant class template for storing fixed-size sequences of objects.
    • +

    Algorithms

    @@ -70,14 +74,17 @@

    Table Of Contents

    Previous topic

    -

    Libraries

    +

    Class template array

    Next topic

    all_of

    @@ -113,7 +120,7 @@ next |
  • - previous |
  • Sprout v1.0 documentation »
  • Sprout C++ Libraries »
  • diff --git a/docs/libs/sprout/array/array/index.html b/docs/libs/sprout/array/array/index.html new file mode 100644 index 00000000..05e29664 --- /dev/null +++ b/docs/libs/sprout/array/array/index.html @@ -0,0 +1,267 @@ + + + + + + + Class template array — Sprout v1.0 documentation + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +

    Class template array

    +
    +

    Interface

    +
    template <typename T, std::size_t N>
    +class array {
    +      // types:
    +      typedef T& reference;
    +      typedef T const& const_reference;
    +      typedef /*implementation-defined*/ iterator;
    +      typedef /*implementation-defined*/ const_iterator;
    +      typedef std::size_t size_type;
    +      typedef std::ptrdiff_t difference_type;
    +      typedef T value_type;
    +      typedef T* pointer;
    +      typedef T const* const_pointer;
    +      typedef sprout::reverse_iterator<iterator> reverse_iterator;
    +      typedef sprout::reverse_iterator<const_iterator> const_reverse_iterator;
    +
    +      // constants:
    +      SPROUT_STATIC_CONSTEXPR size_type static_size = N;
    +
    +      T elems[N ? N : 1]; // exposition only
    +
    +      // construct/copy/destroy:
    +      template<typename T2>
    +      array& operator=(array<T2, N> const& rhs);
    +      template<typename T2>
    +      array& operator=(array<T2, N>&& rhs);
    +
    +      // modifiers:
    +      void fill(const_reference u);
    +      SPROUT_CONSTEXPR array fill(const_reference value) const;
    +      void assign(const_reference value);
    +      SPROUT_CONSTEXPR array assign(const_reference value) const;
    +      void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
    +
    +      // iterators:
    +      iterator begin() SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
    +      iterator end() SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
    +      reverse_iterator rbegin() SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
    +      reverse_iterator rend() SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
    +
    +      // capacity:
    +      SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
    +
    +      // element access:
    +      reference operator[](size_type n);
    +      SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
    +      reference at(size_type n);
    +      SPROUT_CONSTEXPR const_reference at(size_type n) const;
    +      reference front();
    +      SPROUT_CONSTEXPR const_reference front() const;
    +      reference back();
    +      SPROUT_CONSTEXPR const_reference back() const;
    +      pointer data() SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
    +      pointer c_array() SPROUT_NOEXCEPT;
    +      SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
    +};
    +
    +
    +
    +
    +

    Description

    +
    +

    Member functions

    +
    +

    (initializer)

    +
      +
    • (initializer)
    • +
    +
    +
    +

    construct/copy/destroy

    +
      +
    • operator=
    • +
    +
    +
    +

    modifiers

    +
      +
    • fill
    • +
    • assign
    • +
    +
    +
    +

    iterators

    +
      +
    • begin
    • +
    • end
    • +
    • rbegin
    • +
    • rend
    • +
    • cbegin
    • +
    • cend
    • +
    • crbegin
    • +
    • crend
    • +
    +
    +
    +

    capacity

    +
      +
    • size
    • +
    • max_size
    • +
    • empty
    • +
    +
    +
    +

    element access

    +
      +
    • operator[]
    • +
    • at
    • +
    • front
    • +
    • back
    • +
    • data
    • +
    • c_array
    • +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    +
    +

    Table Of Contents

    + + +

    Previous topic

    +

    Sprout.Array

    +

    Next topic

    +

    Sprout.Algorithm

    +

    This Page

    + + + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/docs/libs/sprout/array/index.html b/docs/libs/sprout/array/index.html new file mode 100644 index 00000000..03401ff3 --- /dev/null +++ b/docs/libs/sprout/array/index.html @@ -0,0 +1,152 @@ + + + + + + + Sprout.Array — Sprout v1.0 documentation + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +

    Sprout.Array

    +
    +

    Interface

    +
    template <typename T, std::size_t N>
    +class array;
    +
    +template<typename T, std::size_t N>
    +inline void swap(sprout::array<T, N>& lhs, sprout::array<T, N>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)));
    +
    +template<typename T, std::size_t N>
    +inline SPROUT_CONSTEXPR sprout::array<T, N> to_array(T const (& arr)[N]);
    +
    +
    +
    +
    +

    Classes

    + +
    +
    +

    Non-member functions

    +
      +
    • swap
    • +
    • to_array
    • +
    +
    + +
    + + +
    +
    +
    +
    +
    +

    Table Of Contents

    + + +

    Previous topic

    +

    Libraries

    +

    Next topic

    +

    Class template array

    +

    This Page

    + + + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/docs/searchindex.js b/docs/searchindex.js index d3224b8c..7e606588 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({desctypes:{},terms:{any_of:[0,2],all:7,less:7,sprout:[0,1,2,3,4,5,7],license_1_0:4,all_of:[0,7],through:4,content:1,onli:[5,4],miscellan:6,copyright:[1,4],bind2nd:[3,2,5,7],mathemat:6,under:4,mail:4,modul:1,applic:[3,2,5,7],non:0,random:4,"return":[3,2,5,7],greater:[3,2,5],murakami:4,fals:[3,2,5,7],auto:[3,2,5,7],clang:4,number:4,facebook:4,none_of:[0,3],recurs:[3,2,5,7],like:6,specif:6,list:6,synthes:[6,4],iter:[3,7,2,5,6],mode:4,contain:[3,2,4,5,6,7],path:4,page:[1,4],compil:[1,4],domain:6,twitter:4,see:4,result:[3,2,5,7],logn:[3,2,5,7],librari:[1,6,4],compat:6,index:1,slideshar:4,categori:6,version:4,net:4,boost:4,gener:6,static_assert:[3,2,5,7],constexpr:4,base:4,preprocessor:6,org:4,modifi:0,genyamurakami:4,search:1,last:[3,2,5,7],one_of:[0,5],com:4,licens:4,first:[3,2,5,7],oper:0,softwar:4,rang:[3,2,5,7],arrai:[3,2,5,7],genya:4,header:[3,2,5,7,4],linux:4,instal:[1,4],txt:4,inputiter:[3,2,5,7],blog:4,pred:[3,2,5,7],support:[1,6,4],empti:[3,2,5,7],websit:4,bolero_murakami:4,includ:[3,2,5,7],interfac:[3,2,5,7],conveni:[3,2,5,7],"function":[3,7,2,5,6],namespac:[3,2,5,7],copi:4,metaprogram:6,accompani:4,indic:1,input:[3,2,5,7],inlin:[3,2,5,7],"true":[3,2,5,7],than:[3,2,5,7],logarithm:[3,2,5,7],none:3,stl:6,structur:6,project:[1,4],sprout_constexpr:[3,2,5,7],can:4,www:4,otherwis:[3,2,5,7],invoc:[3,2,5,7],bolero:4,"int":[3,2,5,7],ani:2,templat:[3,7,2,5,6],rai:[6,4],hatena:4,file:4,tabl:1,everi:[3,7],gcc:4,end:[3,2,5,7],welcom:[1,4],lib:4,author:[1,4],hpp:[3,2,5,7],contact:4,other:4,complex:[3,2,5,7],bool:[3,2,5,7],document:1,begin:[3,2,5,7],http:4,distribut:4,trace:[6,4],sequenc:0,object:6,most:[3,2,5,7],typenam:[3,2,5,7],data:6,github:4,algorithm:[0,3,2,4,5,6,7],directori:4,predic:[3,2,5,7],depth:[3,2,5,7],exampl:[3,2,5,7],thi:4,pars:[6,4],sprout_static_constexpr:[3,2,5,7]},titles:["Sprout.Algorithm","Welcome to Sprout’s documentation!","any_of","none_of","Sprout C++ Libraries","one_of","Libraries","all_of"],modules:{},descrefs:{},filenames:["libs/sprout/algorithm/index","index","libs/sprout/algorithm/any_of","libs/sprout/algorithm/none_of","libs/index","libs/sprout/algorithm/one_of","libs/libraries","libs/sprout/algorithm/all_of"]}) \ No newline at end of file +Search.setIndex({desctypes:{},terms:{typenam:[3,6,2,5,7,9],any_of:[0,2],all:9,sprout_noexcept_expr:[5,6],less:9,sprout:[0,1,2,3,4,5,6,7,9],random:4,rbegin:5,all_of:[0,9],through:4,size_t:[5,6],pointer:5,value_typ:5,content:1,onli:[5,7,4],"const":[5,6],miscellan:8,copyright:[1,4],fix:8,blog:4,mathemat:8,swap:[5,6],under:4,mail:4,arrai:[3,6,2,5,7,8,9],applic:[3,2,7,9],non:[0,6],license_1_0:4,"return":[3,2,7,9],greater:[3,2,7],murakami:4,fals:[3,2,7,9],auto:[3,2,7,9],"void":[5,6],clang:4,number:4,facebook:4,front:5,none_of:[0,3],recurs:[3,2,7,9],like:8,specif:8,list:8,synthes:[8,4],iter:[3,2,5,7,8,9],mode:4,contain:[3,2,4,7,8,9],path:4,page:[1,4],compil:[1,4],domain:8,twitter:4,back:5,predic:[3,2,7,9],logarithm:[3,2,7,9],see:4,result:[3,2,7,9],logn:[3,2,7,9],librari:[1,8,4],compat:8,index:1,slideshar:4,categori:8,version:4,const_point:5,net:4,size:[5,8],boost:4,refer:5,gener:8,static_assert:[3,2,7,9],cbegin:5,constexpr:4,base:4,preprocessor:8,org:4,modifi:[0,5],genyamurakami:4,valu:5,search:1,last:[3,2,7,9],arr:6,most:[3,2,7,9],ptrdiff_t:5,implement:5,com:4,support:[1,8,4],first:[3,2,7,9],oper:[0,5],softwar:4,rang:[3,2,7,9],declval:5,can:4,modul:1,genya:4,header:[0,3,2,4,6,7,5,9],empti:[3,5,2,7,9],linux:4,instal:[1,4],txt:4,inputiter:[3,2,7,9],bind2nd:[3,2,7,9],pred:[3,2,7,9],licens:4,contact:4,capac:5,construct:5,"class":[5,6,8],websit:4,compliant:8,bolero_murakami:4,includ:[3,2,7,9],interfac:[3,6,2,5,7,9],conveni:[3,5,2,7,9],type:5,const_reverse_iter:5,cend:5,"function":[3,6,2,5,7,8,9],namespac:[3,2,7,9],copi:[5,4],metaprogram:8,accompani:4,indic:1,c_arrai:5,input:[3,2,7,9],inlin:[3,6,2,7,9],"true":[3,2,7,9],than:[3,2,7,9],std:[5,6],none:3,stl:8,access:5,structur:8,project:[1,4],defin:5,sprout_constexpr:[3,6,2,5,7,9],store:8,www:4,crend:5,otherwis:[3,2,7,9],invoc:[3,2,7,9],bolero:4,constant:5,rend:5,"int":[3,2,7,9],to_arrai:6,ani:2,templat:[3,6,2,5,7,8,9],rai:[8,4],typedef:5,hatena:4,file:4,tabl:1,everi:[3,9],element:5,exposit:5,fill:5,gcc:4,end:[3,5,2,7,9],welcom:[1,4],lib:4,author:[1,4],alphabet:8,hpp:[0,3,2,6,7,5,9],static_s:5,data:[5,8],member:[5,6],other:4,complex:[3,2,7,9],bool:[3,5,2,7,9],difference_typ:5,document:1,const_refer:5,sprout_noexcept:5,begin:[3,5,2,7,9],http:4,distribut:4,trace:[8,4],sequenc:[0,8],object:8,size_typ:5,initi:5,max_siz:5,crbegin:5,const_iter:5,one_of:[0,7],github:4,algorithm:[0,3,2,4,7,8,9],reverse_iter:5,directori:4,descript:5,elem:5,assign:5,depth:[3,2,7,9],exampl:[3,2,7,9],thi:4,destroi:5,pars:[8,4],sprout_static_constexpr:[3,5,2,7,9]},titles:["Sprout.Algorithm","Welcome to Sprout’s documentation!","any_of","none_of","Sprout C++ Libraries","Class template array","Sprout.Array","one_of","Libraries","all_of"],modules:{},descrefs:{},filenames:["libs/sprout/algorithm/index","index","libs/sprout/algorithm/any_of","libs/sprout/algorithm/none_of","libs/index","libs/sprout/array/array/index","libs/sprout/array/index","libs/sprout/algorithm/one_of","libs/libraries","libs/sprout/algorithm/all_of"]}) \ No newline at end of file diff --git a/source/libs/libraries.rst b/source/libs/libraries.rst index 8ed1f31e..8c55cbc1 100644 --- a/source/libs/libraries.rst +++ b/source/libs/libraries.rst @@ -6,8 +6,17 @@ Libraries .. toctree:: :hidden: + sprout/array/index sprout/algorithm/index +.. _sprout-listed_by_alphabetically: +******************************************************************************* +Libraries Listed Alphabetically +******************************************************************************* + +* :doc:`algorithm <./sprout/algorithm/index>` - STL like generic algorithms. +* :doc:`array <./sprout/array/index>` - STL compliant class template for storing fixed-size sequences of objects. + .. _sprout-listed_by_category: ******************************************************************************* Libraries Listed by Category @@ -17,11 +26,13 @@ Libraries Listed by Category Containers and Data structures ======================================= +* :doc:`array <./sprout/array/index>` - STL compliant class template for storing fixed-size sequences of objects. + .. _sprout-listed_by_category-algorithms: Algorithms ======================================= -* :doc:`algorithm <./sprout/algorithm/index>` - STL-like generic algorithms. +* :doc:`algorithm <./sprout/algorithm/index>` - STL like generic algorithms. .. _sprout-listed_by_category-algorithms: Algorithms diff --git a/source/libs/sprout/algorithm/index.rst b/source/libs/sprout/algorithm/index.rst index ed5335da..02f0c980 100644 --- a/source/libs/sprout/algorithm/index.rst +++ b/source/libs/sprout/algorithm/index.rst @@ -16,11 +16,13 @@ Sprout.Algorithm Non-modifying sequence operations ******************************************************************************* -* :doc:`./all_of` +* :doc:`all_of <./all_of>` +* :doc:`any_of <./any_of>` +* :doc:`none_of <./none_of>` +* :doc:`one_of <./one_of>` -* :doc:`./any_of` +Header +======================================== -* :doc:`./none_of` - -* :doc:`./one_of` +``sprout/algorithm.hpp`` diff --git a/source/libs/sprout/array/array/index.rst b/source/libs/sprout/array/array/index.rst new file mode 100644 index 00000000..9fcce8af --- /dev/null +++ b/source/libs/sprout/array/array/index.rst @@ -0,0 +1,138 @@ +.. _sprout-array-array: +############################################################################### +Class template array +############################################################################### + +.. toctree:: + :hidden: + +Interface +======================================== +.. sourcecode:: c++ + + template + class array { + // types: + typedef T& reference; + typedef T const& const_reference; + typedef /*implementation-defined*/ iterator; + typedef /*implementation-defined*/ const_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef T const* const_pointer; + typedef sprout::reverse_iterator reverse_iterator; + typedef sprout::reverse_iterator const_reverse_iterator; + + // constants: + SPROUT_STATIC_CONSTEXPR size_type static_size = N; + + T elems[N ? N : 1]; // exposition only + + // construct/copy/destroy: + template + array& operator=(array const& rhs); + template + array& operator=(array&& rhs); + + // modifiers: + void fill(const_reference u); + SPROUT_CONSTEXPR array fill(const_reference value) const; + void assign(const_reference value); + SPROUT_CONSTEXPR array assign(const_reference value) const; + void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval(), std::declval()))); + + // iterators: + iterator begin() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT; + iterator end() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT; + reverse_iterator rbegin() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT; + reverse_iterator rend() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT; + + // capacity: + SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT; + + // element access: + reference operator[](size_type n); + SPROUT_CONSTEXPR const_reference operator[](size_type n) const; + reference at(size_type n); + SPROUT_CONSTEXPR const_reference at(size_type n) const; + reference front(); + SPROUT_CONSTEXPR const_reference front() const; + reference back(); + SPROUT_CONSTEXPR const_reference back() const; + pointer data() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT; + pointer c_array() SPROUT_NOEXCEPT; + SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT; + }; + + +Description +======================================== + +Member functions +---------------------------------------- + +(initializer) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`(initializer) <./array/initializer->` + +construct/copy/destroy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`operator= <./array/operator-assign>` + +modifiers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`fill <./array/fill>` +* :doc:`assign <./array/assign>` + +iterators +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`begin <./array/begin>` +* :doc:`end <./array/end>` +* :doc:`rbegin <./array/rbegin>` +* :doc:`rend <./array/rend>` +* :doc:`cbegin <./array/cbegin>` +* :doc:`cend <./array/cend>` +* :doc:`crbegin <./array/crbegin>` +* :doc:`crend <./array/crend>` + +capacity +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`size <./array/size>` +* :doc:`max_size <./array/max_size>` +* :doc:`empty <./array/empty>` + +element access +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* :doc:`operator[] <./array/operator-subscript>` +* :doc:`at <./array/at>` +* :doc:`front <./array/front>` +* :doc:`back <./array/back>` +* :doc:`data <./array/data>` +* :doc:`c_array <./array/c_array>` + +Header +======================================== + +``sprout/array/array.hpp`` + +Convenience header: ``sprout/array.hpp`` + diff --git a/source/libs/sprout/array/index.rst b/source/libs/sprout/array/index.rst new file mode 100644 index 00000000..096493bf --- /dev/null +++ b/source/libs/sprout/array/index.rst @@ -0,0 +1,39 @@ +.. _sprout-array: +############################################################################### +Sprout.Array +############################################################################### + +.. toctree:: + :hidden: + + array/index + +Interface +======================================== +.. sourcecode:: c++ + + template + class array; + + template + inline void swap(sprout::array& lhs, sprout::array& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs))); + + template + inline SPROUT_CONSTEXPR sprout::array to_array(T const (& arr)[N]); + +Classes +======================================== + +* :doc:`array <./array/index>` + +Non-member functions +======================================== + +* :doc:`swap <./swap>` +* :doc:`to_array <./to_array>` + +Header +======================================== + +``sprout/array.hpp`` +