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

MWC: make Dummy function placeholders callable to fix build with MSVC #361

Merged
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ settings.json
.pytest_cache/
.cache/
.venv/

# Symlink from 'src/applications/bmqbrkr/run'
src/applications/bmqbrkr/etc/etc

# 'sim_cpp11_features.pl' backups
*.bak
11 changes: 10 additions & 1 deletion src/groups/mwc/mwcex/mwcex_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
//..

// MWC

#include <mwcex_executortraits.h>

// BDE
Expand Down Expand Up @@ -295,6 +294,16 @@ class Executor_Box_SboImp {
/// size of the on-stack buffer used to store the executor target.
struct Dummy {
void* d_padding[4];

bool operator==(const Dummy&) const BSLS_KEYWORD_NOEXCEPT
{
return false;
}

void post(const bsl::function<void()>&) const
{
// NOTHING
}
};

private:
Expand Down
8 changes: 4 additions & 4 deletions src/groups/mwc/mwcex/mwcex_future.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@
// result-supplier thread.

// MWC

#include <mwcu_objectplaceholder.h>

// BDE
#include <bdlb_nullablevalue.h>
#include <bdlf_noop.h>
#include <bsl_algorithm.h> // bsl::swap
#include <bsl_exception.h>
#include <bsl_functional.h> // bsl::reference_wrapper
Expand Down Expand Up @@ -150,7 +150,7 @@

#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
// Include version that can be compiled with C++03
// Generated on Wed Jun 29 04:17:13 2022
// Generated on Wed Jul 17 12:44:45 2024
// Command line: sim_cpp11_features.pl mwcex_future.h
#define COMPILING_MWCEX_FUTURE_H
#include <mwcex_future_cpp03.h>
Expand Down Expand Up @@ -232,7 +232,7 @@ class Future_Exception {

/// Provides a "small" dummy object which size is used to calculate the
/// size of the on-stack buffer used for optimization.
struct Dummy {
struct Dummy : public bdlf::NoOp {
void* d_padding[3];
};

Expand Down Expand Up @@ -359,7 +359,7 @@ class Future_Callback {

/// Provides a "small" dummy object which size is used to calculate the
/// size of the on-stack buffer used for optimization.
struct Dummy {
struct Dummy : public bdlf::NoOp {
void* d_padding[3];
};

Expand Down
Loading
Loading