GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpprefjp - C++日本語リファレンス
  • GitHub Project

This view

  • Original page
  • New address

GeezerVison is showing cpprefjp.github.io — std::basic_string::append_range - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. string
  3. basic_string
  4. append_range

最終更新日時: 2025年08月31日 19時06分36秒 (JST)
Raclamusi が更新

履歴 編集

function template
<string>

std::basic_string::append_range(C++23)

template <container-compatible-range<charT> R>
constexpr void append_range(R&& rg); // C++23

概要

Rangeの要素を末尾へ追加する。

効果

append(basic_string(from_range, forward<R>(rg), get_allocator()));

例

#include <iostream>
#include <string>

int main()
{
  std::string s = "str";
  const char a[3] = {'i', 'n', 'g'};

  // Rangeを末尾に追加
  s.append_range(a);

  std::cout << s << std::endl;
}

出力

string

関連項目

名前 説明
push_back 末尾へ要素追加
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.