typedef -> using

This commit is contained in:
Victor Zverovich
2019-07-07 17:14:26 -07:00
parent c92dc37464
commit f6f0415b83
7 changed files with 58 additions and 71 deletions
+6 -6
View File
@@ -69,7 +69,7 @@ FMT_BEGIN_NAMESPACE
A reference to a null-terminated string. It can be constructed from a C
string or ``std::string``.
You can use one of the following typedefs for common character types:
You can use one of the following type aliases for common character types:
+---------------+-----------------------------+
| Type | Definition |
@@ -108,8 +108,8 @@ template <typename Char> class basic_cstring_view {
const Char* c_str() const { return data_; }
};
typedef basic_cstring_view<char> cstring_view;
typedef basic_cstring_view<wchar_t> wcstring_view;
using cstring_view = basic_cstring_view<char>;
using wcstring_view = basic_cstring_view<wchar_t>;
// An error code.
class error_code {
@@ -266,7 +266,7 @@ long getpagesize();
class Locale {
private:
# ifdef _MSC_VER
typedef _locale_t locale_t;
using locale_t = _locale_t;
enum { LC_NUMERIC_MASK = LC_NUMERIC };
@@ -287,14 +287,14 @@ class Locale {
void operator=(const Locale&) = delete;
public:
typedef locale_t Type;
using type = locale_t;
Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", nullptr)) {
if (!locale_) FMT_THROW(system_error(errno, "cannot create locale"));
}
~Locale() { freelocale(locale_); }
Type get() const { return locale_; }
type get() const { return locale_; }
// Converts string to floating-point number and advances str past the end
// of the parsed input.