Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
thraneh committed Dec 21, 2022
1 parent 4c1a1e3 commit 7b940b3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 1 files
+2 −0 CHANGELOG.md
15 changes: 11 additions & 4 deletions include/roq/source_location.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,20 @@ struct source_location final {
return source_location{file, line, function};
}

constexpr char const *file_name() const noexcept { return file_; }
constexpr std::uint_least32_t line() const noexcept { return line_; }
constexpr char const *function_name() const noexcept { return function_; }
constexpr char const *file_name() const noexcept {
return file_;
}
constexpr std::uint_least32_t line() const noexcept {
return line_;
}
constexpr char const *function_name() const noexcept {
return function_;
}

protected:
constexpr source_location(char const *file, std::int_least32_t line, char const *function)
: file_{file}, line_{static_cast<decltype(line_)>(line)}, function_{function} {}
: file_{file}, line_{static_cast<decltype(line_)>(line)}, function_{function} {
}

private:
char const *const file_;
Expand Down
8 changes: 6 additions & 2 deletions include/roq/utils/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ namespace detail {
using std::begin;
using std::end;
template <typename T>
auto is_iterable_impl(int)
-> decltype(begin(std::declval<T &>()) != end(std::declval<T &>()), void(), ++std::declval<decltype(begin(std::declval<T &>())) &>(), void(*begin(std::declval<T &>())), std::true_type{});
auto is_iterable_impl(int) -> decltype(
begin(std::declval<T &>()) != end(std::declval<T &>()),
void(),
++std::declval<decltype(begin(std::declval<T &>())) &>(),
void(*begin(std::declval<T &>())),
std::true_type{});
template <typename T>
std::false_type is_iterable_impl(...);
} // namespace detail
Expand Down

0 comments on commit 7b940b3

Please sign in to comment.