HomePhabricator

Fixed build warning for constexpr in amount.h for C++14

Description

Fixed build warning for constexpr in amount.h for C++14

Summary:
Ran into this warning while building on OSX:

../../src/amount.h:75:22: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior
      [-Wconstexpr-not-const]
    constexpr Amount operator-() { return Amount(-amount); }
                     ^
                                 const

It looks like the rest of the constexpr in this file are either friends or already have const applied.

Test Plan: make check

Reviewers: deadalnix, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D933

Details

Provenance
jasonbcoxAuthored on Jan 11 2018, 19:10
jasonbcoxPushed on Jan 12 2018, 06:28
Reviewer
Restricted Project
Differential Revision
D933: Fixed build warning for constexpr in amount.h for C++14
Parents
rABC16cbb9e86e3f: Refactored sig hash type in CTransactionSignatureSerializer
Branches
Unknown
Tags
Unknown