Changeset a629655 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:
92cb73f
Parents:
980ad03
git-author:
Dzejrou <dzejrou@…> (2018-05-03 17:49:39)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
Message:

cpp: added a constexpr pow builtin wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/internal/builtins.hpp

    r980ad03 ra629655  
    6464    }
    6565
     66    template<class T, class U>
     67    constexpr T pow(T base, U exp)
     68    {
     69        return static_cast<T>(
     70            __builtin_pow(static_cast<double>(base), static_cast<double>(exp))
     71        );
     72    }
     73
    6674    template<class T>
    6775    constexpr size_t ceil(T val)
Note: See TracChangeset for help on using the changeset viewer.