1

glibc から uclibc に移植しているプロジェクトがあり、この奇妙なことに遭遇しました。

gcc --std=c++11 Foo.cpp -o Foo-glibc
x86_64-linux-uclibc-gcc --std=c++11 Foo.cpp -o Foo-uclibc

// Compiles under glibc and uclibc
class Foo {
  Foo() = default;
  Foo(const Foo& arg) = delete;
  ~Foo() = default;
};

// Only compiles under glibc
class Foo {
  Foo() = default;
  Foo(const Foo& arg);
  ~Foo() = default;
};
Foo::Foo(const Foo& arg) = delete; // uclibc - Error: deleted definition of 'Foo::Foo(const Foo&)'

なぜこのエラーが発生するのですか? これは予想される動作ですか?私が読んだものは、uclibc がこれを処理できないことを示唆していません。

4

1 に答える 1