DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
with_source_location.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_WITH_SOURCE_LOCATION_H
13 #define DOCWIRE_WITH_SOURCE_LOCATION_H
14 
15 #include "source_location.h"
16 
17 namespace docwire::detail
18 {
24  template <typename T>
26  {
27  T value;
28  source_location location;
29 
30  constexpr with_source_location(T val, const source_location& loc = source_location::current())
31  : value(val), location(loc) {}
32  };
33 }
34 
35 #endif // DOCWIRE_WITH_SOURCE_LOCATION_H
A fallback implementation of source_location for compilers that do not support std::source_location.
Helper struct to capture the source location of a call site. This is implicitly constructed from a va...