[ Web Proxy ]
URL:
Viewing: http://ru.cppreference.com/cpp/string/basic_string/end [Back]  [Original]

std::basic_string<CharT,Traits,Allocator>::end, std::basic_string<CharT,Traits,Allocator>::cend cppreference.com
cppreference.com

std::basic_string<CharT,Traits,Allocator>::end, std::basic_string<CharT,Traits,Allocator>::cend

cppreference.com
 
C++
(C++20)
(C++20)
(C++11)
(C++20)
/
(C++11)
(C++11)
(C++11)
(C++17)
 
 
std::basic_string
-
(C++17)
,
/
( C++20)( C++20)( C++20)( C++20)( C++20)(C++20)
(C++11)(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
 
<tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody>
(1)
iterator end();
( C++11)
iterator end() noexcept;
( C++11)
( C++20)
constexpr iterator end() noexcept;
( C++20)
(2)
const_iterator end() const;
( C++11)
const_iterator end() const noexcept;
( C++11)
( C++20)
constexpr const_iterator end() const noexcept;
( C++20)
(3)
const_iterator cend() const;
( C++11)
const_iterator cend() const noexcept;
( C++11)
( C++20)
constexpr const_iterator cend() const noexcept;
( C++20)

, . , .

()

, .

.

libstdc++, cend() C++98.

#include <algorithm>
#include <iostream>
#include <iterator>
#include <string>

int main()
{
    std::string s("Exemparl");
    std::next_permutation(s.begin(), s.end());
    
    std::string c;
    std::copy(s.cbegin(), s.cend(), std::back_inserter(c));
    std::cout << c << '\n'; // "Exemplar"
}

:

Exemplar

C++:

LWG 1192 C++98 std::basic_string - cend()


(public -) []
(C++17)

(public - std::basic_string_view<CharT,Traits>) []

Web Proxy Viewer  |  New URL  |  Original Page