Sep 19, 2013

[c++14][c++11][NOTE] int vs. unsigned int

decltype(auto) for template return type.

noexcept in part of the function _interface_ 
Not because of the function's implementation. 

Allocator required to be noexcept, copy and moveable.

The emerging use for const T&& function template parameters is to allow
binding lvalues while prohibing binding rvalues,
e.g., from C++11 20.8/2:
 
template <class T> reference_wrapper<T> ref(T&) noexcept;
template <class T> reference_wrapper<const T> cref(const T&) noexcept;
template <class T> void ref(const T&&) = delete;
template <class T> void cref(const T&&) = delete;

Int and all these types:
Use int instead of unsigned int unless we need to use

  • bit operation (mask, &, |,etc.) 
  • 2's complement arithmetic 

Use the smallest integer that will suffice. Otherwise, use an int.
More? Use 64bits integer.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.