std :: piecewise_construct構文はどのように機能しますか?

void.pointer

std::piecewise_construct一緒に使用する場合は少し混乱std::mapます。例:

std::map<std::string, std::string> m;

// uses pair's piecewise constructor
m.emplace(std::piecewise_construct,
          std::forward_as_tuple("c"),
          std::forward_as_tuple(10, 'c'));

使用emplace()時にこのタイプの構造を異なる方法で処理する方法をどのように知っているのかわかりませんpiecewise_constructそれはすべきではありません:std::piecewise_construct(std::forward_as_tuple("c"), std::forward_as_tuple(10, 'c'))カンマだけでどのように機能するのでしょうか。オーバーロードされたコンマ演算子や、emplace区分的引数、次に変数引数を処理するための特別なオーバーロードは表示されませんここに示すよう)。

2000年問題

std::map::emplaceemplacestd::map<std::string, std::string>::value_type(typedef to std::pair<const std::string, std::string>)の(転送する)引数を使用してコンストラクターを直接呼び出します

std::pairコンストラクターがstd::piecewise_construct_t(のタイプstd::piecewise_constructを取る

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

std :: strlenは内部的にどのように機能しますか?

分類Dev

std :: flushはどのように機能しますか?

分類Dev

std :: tieはどのように機能しますか?

分類Dev

std :: forwardはどのように機能しますか?

分類Dev

std :: enable_ifはどのように機能しますか?

分類Dev

`std :: mem :: swap`はどのように機能しますか?

分類Dev

`std :: less`はどのように機能しますか?

分類Dev

std :: current_exceptionはどのように機能しますか?

分類Dev

std :: optionは内部でどのように機能しますか?

分類Dev

std :: uncaught_exceptionはどのように機能しますか?

分類Dev

このstd :: is_classの実装はどのように機能しますか?

分類Dev

std :: pairのこのconst参照はどのように機能しますか?

分類Dev

libcxxのstd :: is_functionの実装はどのように機能しますか?

分類Dev

std :: find_last_ofは実際にどのように機能しますか?

分類Dev

std :: vector :: reservedは実際にどのように機能しますか?

分類Dev

libc ++のstd :: is_literal_typeはどのように機能しますか?

分類Dev

std :: great <>はセットでどのように機能しますか?

分類Dev

std :: setwは文字列出力でどのように機能しますか?

分類Dev

C ++:std :: stringでヌル文字はどのように機能しますか?

分類Dev

std :: notify_all_at_thread_exitはどのように機能しますか?

分類Dev

std.string.toStringzはdlangでどのように機能しますか?

分類Dev

std :: array境界チェックはどのように機能しますか?

分類Dev

アロケータはstd :: vectorでどのように機能しますか?

分類Dev

std :: string length()関数はどのように機能しますか?

分類Dev

std :: unique_lockとstd :: condition_variableはどのように機能しますか

分類Dev

「std :: cout << std :: endl;」はどのように機能しますか コンパイル?

分類Dev

std :: make_sharedとstd :: make_uniqueは舞台裏でどのように機能しますか?

分類Dev

std :: any、RTTIなしの場合、どのように機能しますか?

分類Dev

Eric Nieblerによるstd :: is_functionの実装はどのように機能しますか?

Related 関連記事

  1. 1

    std :: strlenは内部的にどのように機能しますか?

  2. 2

    std :: flushはどのように機能しますか?

  3. 3

    std :: tieはどのように機能しますか?

  4. 4

    std :: forwardはどのように機能しますか?

  5. 5

    std :: enable_ifはどのように機能しますか?

  6. 6

    `std :: mem :: swap`はどのように機能しますか?

  7. 7

    `std :: less`はどのように機能しますか?

  8. 8

    std :: current_exceptionはどのように機能しますか?

  9. 9

    std :: optionは内部でどのように機能しますか?

  10. 10

    std :: uncaught_exceptionはどのように機能しますか?

  11. 11

    このstd :: is_classの実装はどのように機能しますか?

  12. 12

    std :: pairのこのconst参照はどのように機能しますか?

  13. 13

    libcxxのstd :: is_functionの実装はどのように機能しますか?

  14. 14

    std :: find_last_ofは実際にどのように機能しますか?

  15. 15

    std :: vector :: reservedは実際にどのように機能しますか?

  16. 16

    libc ++のstd :: is_literal_typeはどのように機能しますか?

  17. 17

    std :: great <>はセットでどのように機能しますか?

  18. 18

    std :: setwは文字列出力でどのように機能しますか?

  19. 19

    C ++:std :: stringでヌル文字はどのように機能しますか?

  20. 20

    std :: notify_all_at_thread_exitはどのように機能しますか?

  21. 21

    std.string.toStringzはdlangでどのように機能しますか?

  22. 22

    std :: array境界チェックはどのように機能しますか?

  23. 23

    アロケータはstd :: vectorでどのように機能しますか?

  24. 24

    std :: string length()関数はどのように機能しますか?

  25. 25

    std :: unique_lockとstd :: condition_variableはどのように機能しますか

  26. 26

    「std :: cout << std :: endl;」はどのように機能しますか コンパイル?

  27. 27

    std :: make_sharedとstd :: make_uniqueは舞台裏でどのように機能しますか?

  28. 28

    std :: any、RTTIなしの場合、どのように機能しますか?

  29. 29

    Eric Nieblerによるstd :: is_functionの実装はどのように機能しますか?

ホットタグ

アーカイブ