[Gmp-commit] /var/hg/gmp: Clarify doc of C++ includes and library

mercurial at gmplib.org mercurial at gmplib.org
Thu Jan 20 23:04:49 CET 2022


details:   /var/hg/gmp/rev/57d07fb3341f
changeset: 18295:57d07fb3341f
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Thu Jan 20 23:04:42 2022 +0100
description:
Clarify doc of C++ includes and library

diffstat:

 ChangeLog    |   4 ++++
 doc/gmp.texi |  13 ++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r b14bd5e2ea0a -r 57d07fb3341f ChangeLog
--- a/ChangeLog	Wed Jan 05 18:19:17 2022 +0100
+++ b/ChangeLog	Thu Jan 20 23:04:42 2022 +0100
@@ -1,3 +1,7 @@
+2022-01-20  Marc Glisse  <marc.glisse at inria.fr>
+
+	* doc/gmp.texi: Clarify C++ includes and library.
+
 2022-01-05 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* gen-sieve.c: Generate masks depending on bit size.
diff -r b14bd5e2ea0a -r 57d07fb3341f doc/gmp.texi
--- a/doc/gmp.texi	Wed Jan 05 18:19:17 2022 +0100
+++ b/doc/gmp.texi	Thu Jan 20 23:04:42 2022 +0100
@@ -1860,7 +1860,9 @@
 @cindex Include files
 @cindex @code{#include}
 All declarations needed to use GMP are collected in the include file
- at file{gmp.h}.  It is designed to work with both C and C++ compilers.
+ at file{gmp.h}, except for the @ref{C++ Class Interface} which comes with its
+own separate header @file{gmpxx.h}.  @file{gmp.h} is designed to work with
+both C and C++ compilers.
 
 @example
 #include <gmp.h>
@@ -1868,7 +1870,7 @@
 
 @cindex @code{stdio.h}
 Note however that prototypes for GMP functions with @code{FILE *} parameters
-are only provided if @code{<stdio.h>} is included too.
+are only provided if @code{<stdio.h>} is included before.
 
 @example
 #include <stdio.h>
@@ -1892,9 +1894,10 @@
 @end example
 
 @cindex @code{libgmpxx}
-GMP C++ functions are in a separate @file{libgmpxx} library.  This is built
-and installed if C++ support has been enabled (@pxref{Build Options}).  For
-example,
+GMP C++ functions are in a separate @file{libgmpxx} library, including the
+ at ref{C++ Class Interface} but also @ref{C++ Formatted Output} for regular
+GMP types.  This is built and installed if C++ support has been enabled
+(@pxref{Build Options}).  For example,
 
 @example
 g++ mycxxprog.cc -lgmpxx -lgmp


More information about the gmp-commit mailing list