Commit 6f3c095e authored by Victor Zverovich's avatar Victor Zverovich

Use FMT_DISALLOW_COPY_AND_ASSIGN instead of undefined assignment operators

parent 0fea89ec
......@@ -240,10 +240,10 @@ void check_sign(const Char *&s, const Arg &arg) {
// left alignment if it is negative.
class WidthHandler : public fmt::internal::ArgVisitor<WidthHandler, unsigned> {
private:
WidthHandler& operator=(WidthHandler const&); //no impl
fmt::FormatSpec &spec_;
FMT_DISALLOW_COPY_AND_ASSIGN(WidthHandler);
public:
explicit WidthHandler(fmt::FormatSpec &spec) : spec_(spec) {}
......@@ -286,11 +286,11 @@ class PrecisionHandler :
template <typename T>
class ArgConverter : public fmt::internal::ArgVisitor<ArgConverter<T>, void> {
private:
ArgConverter& operator=(ArgConverter const&); //no impl
fmt::internal::Arg &arg_;
wchar_t type_;
FMT_DISALLOW_COPY_AND_ASSIGN(ArgConverter);
public:
ArgConverter(fmt::internal::Arg &arg, wchar_t type)
: arg_(arg), type_(type) {}
......@@ -326,9 +326,10 @@ class ArgConverter : public fmt::internal::ArgVisitor<ArgConverter<T>, void> {
// Converts an integer argument to char for printf.
class CharConverter : public fmt::internal::ArgVisitor<CharConverter, void> {
private:
CharConverter& operator=(CharConverter const&); // no impl
fmt::internal::Arg &arg_;
FMT_DISALLOW_COPY_AND_ASSIGN(CharConverter);
public:
explicit CharConverter(fmt::internal::Arg &arg) : arg_(arg) {}
......@@ -531,13 +532,13 @@ template <typename Char>
class fmt::internal::ArgFormatter :
public fmt::internal::ArgVisitor<fmt::internal::ArgFormatter<Char>, void> {
private:
ArgFormatter& operator=(ArgFormatter const&); // no impl
fmt::BasicFormatter<Char> &formatter_;
fmt::BasicWriter<Char> &writer_;
fmt::FormatSpec &spec_;
const Char *format_;
FMT_DISALLOW_COPY_AND_ASSIGN(ArgFormatter);
public:
ArgFormatter(
fmt::BasicFormatter<Char> &f,fmt::FormatSpec &s, const Char *fmt)
......
......@@ -991,10 +991,10 @@ class PrintfFormatter : private FormatterBase {
template <typename Char>
class BasicFormatter : private internal::FormatterBase {
private:
BasicFormatter& operator=(BasicFormatter const&); // no impl
BasicWriter<Char> &writer_;
const Char *start_;
FMT_DISALLOW_COPY_AND_ASSIGN(BasicFormatter);
// Parses argument index and returns corresponding argument.
internal::Arg parse_arg_index(const Char *&s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment