C++17の新機能予定

C++17、およびTechnical Speficicationに採択された提案文書。

コア言語

template<typename... Args>
bool f(Args... args) { 
    return (true + ... + args);
} 

ライブラリ

template <class... Args>
pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
template <class... Args>
pair<iterator, bool> try_emplace(key_type&& k, Args&&... args); 
template <class... Args>
iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
template <class... Args>
iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
template <class M>
pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
template <class M>
pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
template <class M>
iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
template <class M>
iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);

Parallelism TS

Library Fundamentals TS

Library Fundamentals TS 2

Transactional Memory TS

その他、承認された変更

  • N4230で、入れ子になった名前空間の定義を、namespace A::B::C {}と書けるようにする。意味としてはnamespace A { namespace B { namespace C { }}}を短く書けるようにしただけ。
  • N3922で、よく落とし穴になっていたauto x{y};の意味を変更し、yの型を推論するようにした。これまでは驚くことに、xinitializer_listと推論されていた。
  • N4086で、トライグラフを 削除する ことにした。
  • N4190で、非推奨になっていた機能をC++17の標準ライブラリから 削除する
    • auto_ptrbind1st/bind2ndptr_fun/mem_fun/mem_fun_refrandom_shuffle、その他いくつか。