Dimitry Andric 238564b86a math/givaro: only declare std::bool_constant if it does not exist yet
While doing test builds for bug 284159 (math/linbox), I ran into an
issue compiling against one of the math/givaro headers, with clang and
libc++ 19:

  /usr/local/include/givaro/random-integer.h:40:14: error: reference to 'bool_constant' is ambiguous
     40 |         std::bool_constant<_Exact_Size>::type _Exact_Size_t;
        |              ^
  /usr/include/c++/v1/__type_traits/integral_constant.h:42:1: note: candidate found by name lookup is 'std::__1::bool_constant'
     42 | using bool_constant = integral_constant<bool, __b>;
        | ^
  /usr/local/include/givaro/random-integer.h:16:5: note: candidate found by name lookup is 'std::bool_constant'
     16 |     using bool_constant = integral_constant<bool, B>;
        |     ^

The problem is that random-integer.h attempts to declare
std::bool_constant, even though libc++ headers already have this
template.

Conditionalize it on __cpp_lib_bool_constant [1], so it is only declared
when necessary (i.e. if somebody compiles against and older C++
library).

[1] https://en.cppreference.com/w/cpp/feature_test#cpp_lib_bool_constant

PR:		284167
Approved by:	pi (maintainer)
MFH:		2025Q1
2025-01-19 19:09:20 +01:00
2025-01-19 06:46:51 -06:00
2025-01-17 12:28:11 -08:00
2024-12-27 11:37:24 +01:00
2025-01-17 22:44:30 +00:00
2025-01-13 19:32:10 +01:00
2025-01-18 19:53:12 -08:00
2025-01-19 10:09:47 +01:00
2025-01-12 07:40:26 +01:00
2025-01-19 18:12:54 +01:00
2025-01-19 14:31:58 +01:00
2025-01-19 12:00:43 +01:00
2025-01-13 10:25:28 +01:00
2025-01-18 01:27:04 +01:00
2025-01-01 15:34:59 +09:00
2025-01-05 14:55:03 +08:00
2025-01-18 18:23:16 +01:00
2025-01-05 14:55:03 +08:00
2025-01-17 13:34:01 +01:00

This is the FreeBSD Ports Collection.  For an easy to use
WEB-based interface to it, please see:

	https://ports.FreeBSD.org

For general information on the Ports Collection, please see the
FreeBSD Handbook ports section which is available from:

	https://docs.freebsd.org/en/books/handbook/ports/
		for the latest official version
	or:
	The ports(7) manual page (man ports).

These will explain how to use ports and packages.

If you would like to search for a port, you can do so easily by
saying (in /usr/ports):

	make search name="<name>"
	or:
	make search key="<keyword>"

which will generate a list of all ports matching <name> or <keyword>.
make search also supports wildcards, such as:

	make search name="gtk*"

For information about contributing to FreeBSD ports, please see the Porter's
Handbook, available at:

	https://docs.freebsd.org/en/books/porters-handbook/

NOTE:  This tree will GROW significantly in size during normal usage!
The distribution tar files can and do accumulate in /usr/ports/distfiles,
and the individual ports will also use up lots of space in their work
subdirectories unless you remember to "make clean" after you're done
building a given port.  /usr/ports/distfiles can also be periodically
cleaned without ill-effect.
S
Description
No description provided
Readme 2 GiB
Languages
Makefile 59.7%
C 16.1%
Shell 7.2%
Roff 5%
C++ 3.7%
Other 7%