aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-04-13 16:34:51 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-04-14 11:58:39 +0100
commit6a9547f3ca6c48f116478169d5fc62165dde7f43 (patch)
tree7b1cabf4790f70ec44103b969be04e790d8de9ea /gcc
parentb0e85485fbf042abccee5c0a9eb499da386c8db3 (diff)
downloadgcc-6a9547f3ca6c48f116478169d5fc62165dde7f43.zip
gcc-6a9547f3ca6c48f116478169d5fc62165dde7f43.tar.gz
gcc-6a9547f3ca6c48f116478169d5fc62165dde7f43.tar.bz2
libstdc++: Improve diagnostics for invalid std::format calls
Add a static_assert and a comment so that calling std::format for unformattable argument types will now show: /home/jwakely/gcc/13/include/c++/13.0.1/format:3563:22: error: static assertion failed: std::formatter must be specialized for each format arg 3563 | static_assert((is_default_constructible_v<formatter<_Args, _CharT>> && ...), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and: 140 | formatter() = delete; // No std::formatter specialization for this type. libstdc++-v3/ChangeLog: * include/std/format (formatter): Add comment to deleted default constructor of primary template. (_Checking_scanner): Add static_assert.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions