Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More modules tinkering #109

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DFLUX_BUILD_BENCHMARKS=${{matrix.build_type == 'Release'}} \
-DFLUX_BUILD_MODULE=On \
-A ${{matrix.platform}} \
$GITHUB_WORKSPACE

Expand Down
6 changes: 3 additions & 3 deletions include/flux/core/assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace flux {

FLUX_EXPORT
struct unrecoverable_error : std::logic_error {
explicit unrecoverable_error(char const* msg) : std::logic_error(msg) {}
explicit inline unrecoverable_error(char const* msg) : std::logic_error(msg) {}
};

namespace detail {
Expand Down Expand Up @@ -50,7 +50,7 @@ FLUX_EXPORT inline constexpr auto runtime_error = detail::runtime_error_fn{};
namespace detail {

struct assert_fn {
constexpr void operator()(bool cond, char const* msg,
inline constexpr void operator()(bool cond, char const* msg,
std::source_location loc = std::source_location::current()) const
{
if (cond) {
Expand All @@ -62,7 +62,7 @@ struct assert_fn {
};

struct bounds_check_fn {
constexpr void operator()(bool cond, std::source_location loc = std::source_location::current()) const
inline constexpr void operator()(bool cond, std::source_location loc = std::source_location::current()) const
{
if (!std::is_constant_evaluated()) {
assert_fn{}(cond, "out of bounds sequence access", std::move(loc));
Expand Down
10 changes: 5 additions & 5 deletions include/flux/source/iota.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct iota_sequence : inline_sequence_base<iota_sequence<T>> {
static constexpr iota_traits traits{.has_start = true, .has_end = false};

public:
constexpr explicit iota_sequence(T from)
inline constexpr explicit iota_sequence(T from)
: start_(std::move(from))
{}

Expand All @@ -144,7 +144,7 @@ struct bounded_iota_sequence : inline_sequence_base<bounded_iota_sequence<T>> {
static constexpr iota_traits traits{.has_start = true, .has_end = true};

public:
constexpr bounded_iota_sequence(T from, T to)
inline constexpr bounded_iota_sequence(T from, T to)
: start_(std::move(from)),
end_(std::move(to))
{}
Expand All @@ -168,17 +168,17 @@ struct iota_fn {
};

struct ints_fn {
constexpr auto operator()() const
inline constexpr auto operator()() const
{
return basic_iota_sequence<distance_t>();
}

constexpr auto operator()(distance_t from) const
inline constexpr auto operator()(distance_t from) const
{
return iota_sequence<distance_t>(from);
}

constexpr auto operator()(distance_t from, distance_t to) const
inline constexpr auto operator()(distance_t from, distance_t to) const
{
return bounded_iota_sequence<distance_t>(from, to);
}
Expand Down