Changeset 980ad03 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:22Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a629655
Parents:
71cde76
git-author:
Dzejrou <dzejrou@…> (2018-05-03 17:49:12)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
Message:

cpp: added digits to specializations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/impl/limits.hpp

    r71cde76 r980ad03  
    351351            static constexpr bool is_specialized = true;
    352352
     353            static constexpr int digits = sizeof(char) * 8;
     354
    353355            static constexpr char max()
    354356            {
     
    373375            static constexpr bool is_specialized = true;
    374376
     377            static constexpr int digits = sizeof(signed char) * 8 - 1;
     378
    375379            static constexpr signed char max()
    376380            {
     
    395399            static constexpr bool is_specialized = true;
    396400
     401            static constexpr int digits = sizeof(short) * 8 - 1;
     402
    397403            static constexpr short max()
    398404            {
     
    417423            static constexpr bool is_specialized = true;
    418424
     425            static constexpr int digits = sizeof(int) * 8 - 1;
     426
    419427            static constexpr int max()
    420428            {
     
    439447            static constexpr bool is_specialized = true;
    440448
     449            static constexpr int digits = sizeof(long) * 8 - 1;
     450
    441451            static constexpr long max()
    442452            {
     
    461471            static constexpr bool is_specialized = true;
    462472
     473            static constexpr int digits = sizeof(long long) * 8 - 1;
     474
    463475            static constexpr long long max()
    464476            {
     
    483495            static constexpr bool is_specialized = true;
    484496
     497            static constexpr int digits = sizeof(unsigned char) * 8;
     498
    485499            static constexpr unsigned char max()
    486500            {
     
    505519            static constexpr bool is_specialized = true;
    506520
     521            static constexpr int digits = sizeof(unsigned short) * 8;
     522
    507523            static constexpr unsigned short max()
    508524            {
     
    527543            static constexpr bool is_specialized = true;
    528544
     545            static constexpr int digits = sizeof(unsigned int) * 8;
     546
    529547            static constexpr unsigned int max()
    530548            {
     
    549567            static constexpr bool is_specialized = true;
    550568
     569            static constexpr int digits = sizeof(unsigned long) * 8;
     570
    551571            static constexpr unsigned long max()
    552572            {
     
    571591            static constexpr bool is_specialized = true;
    572592
     593            static constexpr int digits = sizeof(unsigned long long) * 8;
     594
    573595            static constexpr unsigned long long max()
    574596            {
     
    592614        public:
    593615        // TODO: implement
     616            static constexpr int digits = sizeof(short) * 8 - 1;
    594617    };
    595618
Note: See TracChangeset for help on using the changeset viewer.