Skip to content

Commit

Permalink
Introduce std::source_location. (#702)
Browse files Browse the repository at this point in the history
Introduce `std::source_location`.

Allow exceptions to track source locations.  This is still pretty
rudimentary.

One thing I'm not happy about is the way different exception classes
have their own `source_location` members that are not related to each
other.  This means that if you want to access that field, you have to
catch a fairly specific exception type.

Also of course, it's not great that we can't assume that the compiler
actually supports this feature.  The testing helpers could be much nicer
if they could rely on `source_location` — we might even get by without
some of the preprocessor macros.
  • Loading branch information
jtv committed Jul 23, 2023
1 parent 68c93b6 commit fdb3e0f
Show file tree
Hide file tree
Showing 13 changed files with 780 additions and 104 deletions.
5 changes: 2 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
- Support for `PQinitOpenSSL()`. (#678)
- Slightly more helpful error for unsupported conversions. (#695)
- Replace some C++ feature tests with C++20 feature macros.
- Give `stream_to` a move constructor. (#706)
- Support move in `stream_to`. (#706)
>>>>>>> 42a46214 (Support move assignment as well.)
- Support moving of `stream_to`. (#706)
- Incorporate `source_location` in exceptions.
7.7.4
- `transaction_base::for_each()` is now called `for_stream()`. (#580)
- New `transaction_base::for_query()` is similar, but non-streaming. (#580)
Expand Down
2 changes: 1 addition & 1 deletion config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ am__can_run_installinfo = \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in compile config.guess \
config.sub install-sh ltmain.sh missing mkinstalldirs
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
Expand Down

0 comments on commit fdb3e0f

Please sign in to comment.