Skip to content

Commit

Permalink
refreshing the code, scrapping old stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Feb 1, 2024
1 parent 7b4ad12 commit ed9cf27
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 142 deletions.
4 changes: 4 additions & 0 deletions include/zeep/http/tag-processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class tag_processor

// --------------------------------------------------------------------

#if ZEEP_SUPPORT_TAG_PROCESSOR_V1

/// \brief A tag_processor compatible with the old version of libzeep. Works
/// on tags only, not on attributes. Also parses any occurrence of ${}.
/// For newer code, please consider using the v2 version only.
Expand Down Expand Up @@ -99,6 +101,8 @@ class tag_processor_v1 : public tag_processor
bool process_el(const scope& scope, std::string& s);
};

#endif

// --------------------------------------------------------------------

/// \brief version two of the tag_processor in libzeep
Expand Down
2 changes: 2 additions & 0 deletions include/zeep/http/template-processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ class html_template_processor : public basic_template_processor
{
if (addDefaultTagProcessors)
{
#if ZEEP_SUPPORT_TAG_PROCESSOR_V1
register_tag_processor<tag_processor_v1>();
#endif
register_tag_processor<tag_processor_v2>();
}
}
Expand Down
13 changes: 13 additions & 0 deletions lib-http/src/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#if __cpp_lib_format

#include <format>

std::string FormatDecimal(double d, int integerDigits, int decimalDigits, std::locale loc)
{
return std::vformat(loc, "{:{}.{}f}", std::make_format_args(integerDigits + decimalDigits, decimalDigits, d));
}

#else

#include <regex>
#include <codecvt>
#include <cmath>
Expand Down Expand Up @@ -324,3 +335,5 @@ std::string FormatDecimal(double d, int integerDigits, int decimalDigits, std::l

}


#endif
Loading

0 comments on commit ed9cf27

Please sign in to comment.