aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-02-27 10:52:28 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-02-27 10:52:28 +0000
commiteb8e6a30a442c4c12dc903d6e1817b223bbed4a3 (patch)
tree87fc8aab9f869a67c4110442cf53d2443d33b6f4 /libstdc++-v3/include
parentd12153046816f955e74943af7089d30de6a00e19 (diff)
downloadgcc-eb8e6a30a442c4c12dc903d6e1817b223bbed4a3.zip
gcc-eb8e6a30a442c4c12dc903d6e1817b223bbed4a3.tar.gz
gcc-eb8e6a30a442c4c12dc903d6e1817b223bbed4a3.tar.bz2
libstdc++: Make _GLIBCXX_CONCEPT_CHECKS more constexpr-friendly
Although most of the old-style "concept checks" are only really usable with C++98 because they enforce the wrong things, this is a simple change that makes them a bit more useful for C++14 and up. * include/bits/boost_concept_check.h (__function_requires): Add _GLIBCXX14_CONSTEXPR. * testsuite/25_algorithms/min/concept_checks.cc: New test.
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/boost_concept_check.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/boost_concept_check.h b/libstdc++-v3/include/bits/boost_concept_check.h
index a555b3b..f12c1bdc 100644
--- a/libstdc++-v3/include/bits/boost_concept_check.h
+++ b/libstdc++-v3/include/bits/boost_concept_check.h
@@ -57,7 +57,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// as possible at runtime, use as few resources as possible, and hopefully
// be elided out of existence... hmmm.
template <class _Concept>
-inline void __function_requires()
+_GLIBCXX14_CONSTEXPR inline void __function_requires()
{
void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
}