mattreecebentley / plf_hive

plf::hive is a fork of plf::colony to match the current C++ standards proposal.
https://plflib.org/colony.htm
zlib License
71 stars 7 forks source link

clang12 compilation issue #13

Closed raygoe closed 2 years ago

raygoe commented 2 years ago

On clang12, I get this error:

error: constexpr function's return type 'plf::hive_limits' is not a literal type constexpr static inline plf::hive_limits block_capacity_hard_limits() noexcept note: 'hive_limits' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors struct hive_limits // for use in block_capacity setting/getting functions and constructors

Adding constexpr on the constructor for hive_limits fixes it. Tested MSVC and Clang.

mattreecebentley commented 2 years ago

Fixed in beta, thanks

On 25/04/2022 5:39 am, Eric Christian wrote:

On clang12, I get this error:

error: constexpr function's return type 'plf::hive_limits' is not a literal type constexpr static inline plf::hive_limits block_capacity_hard_limits() noexcept note: 'hive_limits' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors struct hive_limits // for use in block_capacity setting/getting functions and constructors

Adding constexpr on the constructor for hive_limits fixes it. Tested MSVC and Clang.


    You can view, comment on, or merge this pull request online at:

https://github.com/mattreecebentley/plf_hive/pull/13 https://github.com/mattreecebentley/plf_hive/pull/13

    Commit Summary

(1 file https://github.com/mattreecebentley/plf_hive/pull/13/files)

— Reply to this email directly, view it on GitHub https://github.com/mattreecebentley/plf_hive/pull/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE4FIX3NMYED2L7AXCCB63VGWBO3ANCNFSM5UGRL7QQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>