[cfe-users] bug in libc++

Steve Ramsey clang at lucena.com
Wed Oct 2 20:22:38 PDT 2013


On Oct 2, 2013, at 4:56 PM, Manu <monamimani at gmail.com> wrote:
> Hi this simple code is causing compilation error.
> class Foo
> {
> public:
> 
>   Foo(Foo&&) noexcept = default;
>   Foo& operator=(Foo&&) noexcept = default;
> 
>   Foo()
>   {
>   }
> 
> private:
> 
>   std::vector<std::string> vectorFoo_;
> };
> 
> see errors here
> http://coliru.stacked-crooked.com/a/ab2fb522c4982c72
> 
> But if I use libstdc++ it compile fine. So where is the bug libc++ or libstdc++?

Didn’t check your link or try your code, but this might be because std::vector doesn’t have a nothrow move constructor or a nothrow move-assignment operator.

			Steve





More information about the cfe-users mailing list