Re: Clang does not like constexpression

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

 



On 14/06/2017, Jesse Williamson wrote:
> This will no longer be constexpr.

That is true, but only in the case when it throws, and it's similar to the usage in...

http://en.cppreference.com/w/cpp/language/constexpr

>    // constexpr functions signal errors by throwing exceptions
>    // in C++11, they must do so from the conditional operator ?:
>    constexpr char operator[](std::size_t n) const
>    {
>        return n < sz? p[n] : throw std::out_of_range("");
>    }

-- 
Senior Software Engineer           Red Hat Storage, Ann Arbor, MI, US
IRC: Aemerson@{RedHat, OFTC}
0x80F7544B90EDBFB9 E707 86BA 0C1B 62CC 152C  7C12 80F7 544B 90ED BFB9
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux