Re: Why does std::atomic< std::shared_ptr<string> > compile?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5 March 2015 at 23:29, Jonathan Wakely wrote:
> On 5 March 2015 at 23:06, Maik Zumstrull wrote:
>> Does, in fact, compile on gcc 4.9.2 (Fedora). However, based on
>> http://en.cppreference.com/w/cpp/atomic/atomic I would expect this to
>> error out, since std::shared_ptr is surely not TriviallyCopyable. Can
>
> Violating the precondition is undefined behaviour, so there's no
> guarantee it will fail to compile.
>
>
>> somebody in the know (jwakely?) comment whether this is supposed to
>> compile, and would work as implied?
>
> Anyway, with current trunk it fails:
> /home/jwakely/gcc/5/include/c++/5.0.0/atomic:170:7: error: static
> assertion failed: std::atomic requires a trivially copyable type
>
> That wasn't possible previously because we didn't support the
> is_trivially_copyable trait.

This was https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63322




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux