From 8a038fc8da429afea902c686f7e8919129a31846 Mon Sep 17 00:00:00 2001 From: Clonkk Date: Mon, 5 Apr 2021 13:46:51 +0200 Subject: [PATCH] fix example after Vector rename --- cppstl.nim | 4 +- cppstl.nimble | 2 +- docs/cppstl.html | 8 +- docs/cppstl/exception.html | 2 +- docs/cppstl/private/utils.html | 2 +- docs/cppstl/string.html | 41 ++- docs/cppstl/vector.html | 467 +++++++++++++++++---------------- docs/cppstl/vector.idx | 110 ++++---- docs/theindex.html | 158 +++++------ 9 files changed, 405 insertions(+), 389 deletions(-) diff --git a/cppstl.nim b/cppstl.nim index eadde64..e85e08f 100644 --- a/cppstl.nim +++ b/cppstl.nim @@ -4,7 +4,7 @@ import cppstl/string export string ## Nim wrapper for C++ STL ``std::string`` and ``std::vector`` -## * ``std::vector`` mapped to ``Vector`` +## * ``std::vector`` mapped to ``CppVector`` ## * ``std::string`` mapped to ``CppString`` to avoid name conflict (String was too close to ``string``) ## @@ -23,7 +23,7 @@ runnableExamples: runnableExamples: import cppstl import math - var vec = initVector[float64]() + var vec = initCppVector[float64]() for i in 0..<5: vec.push_back(sqrt(i.float64)) assert vec[0] == sqrt 0.0 diff --git a/cppstl.nimble b/cppstl.nimble index 159040d..08ce2b7 100644 --- a/cppstl.nimble +++ b/cppstl.nimble @@ -1,6 +1,6 @@ # Package -version = "0.2.1" +version = "0.2.2" author = "Clonkk" description = "Bindings for the C++ Standard Template Library (STL)" license = "MIT" diff --git a/docs/cppstl.html b/docs/cppstl.html index 9d6403b..8036f55 100644 --- a/docs/cppstl.html +++ b/docs/cppstl.html @@ -111,7 +111,7 @@

cppstl

Nim wrapper for C++ STL std::string and std::vector
-
- +
  • + Funcs + +
  • Converters
      @@ -1192,14 +1198,8 @@

      Procs

  • -
    proc c_str(self: CppString): cstring {...}{.importcpp: "c_str", header: "<string>".}
    -
    - - - -
    - -
    proc data(self: CppString): ptr cchar {...}{.importcpp: "data", header: "<string>".}
    +
    proc c_str(self: CppString): cstring {...}{.importcpp: "const_cast<char*>(#.c_str())",
    +                                       header: "<string>".}
    @@ -1758,6 +1758,19 @@

    Procs

    +
    + +
    +
    +

    Funcs

    +
    + +
    func data(self: CppString): ptr cchar {...}{.importcpp: "const_cast<char*>(#.data())",
    +                                        header: "<string>".}
    +
    + + +
    @@ -1787,7 +1800,7 @@

    Exports

    diff --git a/docs/cppstl/vector.html b/docs/cppstl/vector.html index bb5707b..8891716 100644 --- a/docs/cppstl/vector.html +++ b/docs/cppstl/vector.html @@ -100,12 +100,12 @@

    cppstl/vector

  • Types
  • @@ -113,226 +113,226 @@

    cppstl/vector

    Procs