compat.gmp
#includeGMP -- GNU multiple precision arithmetic library (portable C kernels, built by mcpp)
#include <gmpxx.h>
mcpp add compat.gmp@6.3.0
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// compat.gmp `gmpxx` feature: the C++ bindings compile against the consumer's
// own toolchain and link.
//
// The stream operators are the load-bearing part. Everything else in gmpxx.h is
// inline in the header, so a member that only did arithmetic would link with
// the feature TURNED OFF and prove nothing. `os << mpz_class` resolves to
// __gmp_ostream_operator, which lives in cxx/osmpz.cc — one of the eleven
// sources the feature gates.
//
// It is also the one place where "compiled by the consumer's toolchain" is
// actually tested: those symbols carry std::ostream / std::string in their
// mangled names, so a prebuilt libgmpxx would resolve on libstdc++ and fail on
// libc++.
#include <gmpxx.h>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
namespace {
// …
tests/examples/gmp-gmpxx/tests/gmpxx.cpp · 專案 tests/examples/gmp-gmpxx
建置
- targets
gmp (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
gmp-6.3.0/mcpp/include
功能
| 功能 | 宣告了 |
|---|---|
| gmpxx | sources |
原始檔 (49)
gmp-6.3.0/assert.cgmp-6.3.0/compat.cgmp-6.3.0/errno.cgmp-6.3.0/extract-dbl.cgmp-6.3.0/invalid.cgmp-6.3.0/memory.cgmp-6.3.0/mp_bpl.cgmp-6.3.0/mp_dv_tab.cgmp-6.3.0/mp_get_fns.cgmp-6.3.0/mp_minv_tab.cgmp-6.3.0/mp_set_fns.cgmp-6.3.0/nextprime.cgmp-6.3.0/primesieve.cgmp-6.3.0/tal-reent.cgmp-6.3.0/version.cgmp-6.3.0/mpn/generic/*.c!gmp-6.3.0/mpn/generic/udiv_w_sdiv.c!gmp-6.3.0/mpn/generic/div_qr_1n_pi2.c!gmp-6.3.0/mpn/generic/div_qr_1u_pi2.c!gmp-6.3.0/mpn/generic/logops_n.c!gmp-6.3.0/mpn/generic/popham.c!gmp-6.3.0/mpn/generic/sec_aors_1.c!gmp-6.3.0/mpn/generic/sec_div.c!gmp-6.3.0/mpn/generic/sec_pi1_div.cgmp-6.3.0/mpz/*.cgmp-6.3.0/mpf/*.cgmp-6.3.0/mpq/*.cgmp-6.3.0/printf/*.cgmp-6.3.0/scanf/*.cgmp-6.3.0/rand/*.cgmp-6.3.0/mcpp/mcpp_gmp_and_n.cgmp-6.3.0/mcpp/mcpp_gmp_andn_n.cgmp-6.3.0/mcpp/mcpp_gmp_clz_tab.cgmp-6.3.0/mcpp/mcpp_gmp_fib_table.cgmp-6.3.0/mcpp/mcpp_gmp_hamdist.cgmp-6.3.0/mcpp/mcpp_gmp_ior_n.cgmp-6.3.0/mcpp/mcpp_gmp_iorn_n.cgmp-6.3.0/mcpp/mcpp_gmp_mp_bases.cgmp-6.3.0/mcpp/mcpp_gmp_nand_n.cgmp-6.3.0/mcpp/mcpp_gmp_nior_n.cgmp-6.3.0/mcpp/mcpp_gmp_popcount.cgmp-6.3.0/mcpp/mcpp_gmp_sec_add_1.cgmp-6.3.0/mcpp/mcpp_gmp_sec_div_qr.cgmp-6.3.0/mcpp/mcpp_gmp_sec_div_r.cgmp-6.3.0/mcpp/mcpp_gmp_sec_pi1_div_qr.cgmp-6.3.0/mcpp/mcpp_gmp_sec_pi1_div_r.cgmp-6.3.0/mcpp/mcpp_gmp_sec_sub_1.cgmp-6.3.0/mcpp/mcpp_gmp_xnor_n.cgmp-6.3.0/mcpp/mcpp_gmp_xor_n.c
產生的檔案
gmp-6.3.0/scanf/gmp-impl.hgmp-6.3.0/mcpp/include/gmpxx.hgmp-6.3.0/mcpp/mcpp_gmp_iorn_n.cgmp-6.3.0/mcpp/mcpp_gmp_sec_sub_1.cgmp-6.3.0/gmp-mparam.hgmp-6.3.0/mcpp/mcpp_gmp_mp_bases.cgmp-6.3.0/mpn/generic/gmp-impl.hgmp-6.3.0/rand/longlong.hgmp-6.3.0/mcpp/longlong.hgmp-6.3.0/mcpp/mcpp_gmp_xor_n.cgmp-6.3.0/trialdivtab.hgmp-6.3.0/cxx/gmp-impl.hgmp-6.3.0/mpz/gmp-impl.hgmp-6.3.0/scanf/config.hgmp-6.3.0/rand/gmp-impl.hgmp-6.3.0/mcpp/mcpp_gmp_sec_div_qr.cgmp-6.3.0/printf/gmp-impl.hgmp-6.3.0/config.hgmp-6.3.0/mcpp/mcpp_gmp_sec_add_1.cgmp-6.3.0/mpn/generic/jacobitab.hgmp-6.3.0/mcpp/config.hgmp-6.3.0/printf/longlong.hgmp-6.3.0/printf/config.hgmp-6.3.0/mcpp/mcpp_gmp_fib_table.cgmp-6.3.0/fac_table.hgmp-6.3.0/mcpp/mcpp_gmp_and_n.cgmp-6.3.0/mcpp/mcpp_gmp_popcount.cgmp-6.3.0/mcpp/mcpp_gmp_andn_n.cgmp-6.3.0/sieve_table.hgmp-6.3.0/cxx/gmpxx.hgmp-6.3.0/mpz/config.hgmp-6.3.0/mcpp/mcpp_gmp_sec_div_r.cgmp-6.3.0/mpq/longlong.hgmp-6.3.0/mp_bases.hgmp-6.3.0/mpq/gmp-impl.hgmp-6.3.0/mcpp/mcpp_gmp_nior_n.cgmp-6.3.0/gmp.hgmp-6.3.0/mcpp/gmp.hgmp-6.3.0/mpn/generic/trialdivtab.hgmp-6.3.0/mpn/generic/perfsqr.hgmp-6.3.0/mpz/longlong.hgmp-6.3.0/mcpp/mcpp_gmp_ior_n.cgmp-6.3.0/mpf/longlong.hgmp-6.3.0/mpn/generic/longlong.hgmp-6.3.0/mpn/generic/mpn/generic/hgcd2-div.hgmp-6.3.0/mpf/gmp-impl.hgmp-6.3.0/mpf/config.hgmp-6.3.0/mcpp/mcpp_gmpxx.ccgmp-6.3.0/mcpp/mcpp_gmp_hamdist.cgmp-6.3.0/mcpp/mcpp_gmp_sec_pi1_div_r.cgmp-6.3.0/mcpp/mcpp_gmp_xnor_n.cgmp-6.3.0/mcpp/mcpp_gmp_sec_pi1_div_qr.cgmp-6.3.0/mcpp/mcpp_gmp_nand_n.cgmp-6.3.0/mcpp/mcpp_gmp_clz_tab.cgmp-6.3.0/mpn/generic/config.hgmp-6.3.0/mcpp/gmp-impl.hgmp-6.3.0/mcpp/include/gmp.hgmp-6.3.0/mpq/config.hgmp-6.3.0/fib_table.h