Skip to content
Snippets Groups Projects
Commit bc6eedb6 authored by Verena Reimund's avatar Verena Reimund
Browse files

Attempt to fix build failures

Refs #22383

OSX
FAILED: Framework/SINQ/test/CMakeFiles/PSISINQTest.dir/PoldiIndexKnownCompoundsTest.cpp.o
In file included from Framework/SINQ/test/PoldiIndexKnownCompoundsTest.cpp:17:
PoldiIndexKnownCompoundsTest.h:40:5: error: no matching function for call to 'storeWS'
    WorkspaceCreationHelper::storeWS(
WorkspaceCreationHelper.h:114:33: note: candidate function [with WSType = boost::shared_ptr<Mantid::DataObjects::TableWorkspace>] not viable: expects an l-value for 2nd argument
template <typename WSType> void storeWS(const std::string &name, WSType &ws) {
In file included from Framework/SINQ/test/PoldiIndexKnownCompoundsTest.cpp:17:
PoldiIndexKnownCompoundsTest.h:43:5: error: no matching function for call to 'storeWS'
    WorkspaceCreationHelper::storeWS(
WorkspaceCreationHelper.h:114:33: note: candidate function [with WSType = boost::shared_ptr<Mantid::DataObjects::TableWorkspace>] not viable: expects an l-value for 2nd argument
template <typename WSType> void storeWS(const std::string &name, WSType &ws) {
In file included from Framework/SINQ/test/PoldiIndexKnownCompoundsTest.cpp:17:
PoldiIndexKnownCompoundsTest.h:673:7: error: no matching function for call to 'storeWS'
      WorkspaceCreationHelper::storeWS(
WorkspaceCreationHelper.h:114:33: note: candidate function [with WSType = boost::shared_ptr<Mantid::DataObjects::Workspace2D>] not viable: expects an l-value for 2nd argument
template <typename WSType> void storeWS(const std::string &name, WSType &ws) {
3 errors generated.

Linux
PoldiIndexKnownCompoundsTest.h:42:66: error: invalid initialization of non-const reference of type ‘boost::shared_ptr<Mantid::DataObjects::TableWorkspace>&’ from an rvalue of type ‘Mantid::DataObjects::TableWorkspace_sptr {aka boost::shared_ptr<Mantid::DataObjects::TableWorkspace>}’
          PoldiPeakCollectionHelpers::createPoldiPeakTableWorkspace());
PoldiIndexKnownCompoundsTest.cpp:17:
WorkspaceCreationHelper.h:114:33: note:   initializing argument 2 of ‘void WorkspaceCreationHelper::storeWS(const string&, WSType&) [with WSType = boost::shared_ptr<Mantid::DataObjects::TableWorkspace>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
10:35:30  template <typename WSType> void storeWS(const std::string &name, WSType &ws) {
PoldiIndexKnownCompoundsTest.cpp:17:0:
PoldiIndexKnownCompoundsTest.h:46:31: error: invalid initialization of non-const reference of type ‘boost::shared_ptr<Mantid::DataObjects::TableWorkspace>&’ from an rvalue of type ‘Mantid::DataObjects::TableWorkspace_sptr {aka boost::shared_ptr<Mantid::DataObjects::TableWorkspace>}’
              ->asTableWorkspace());
WorkspaceCreationHelper.h:114:33: note:   initializing argument 2 of ‘void WorkspaceCreationHelper::storeWS(const string&, WSType&) [with WSType = boost::shared_ptr<Mantid::DataObjects::TableWorkspace>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
  template <typename WSType> void storeWS(const std::string &name, WSType &ws) {
PoldiIndexKnownCompoundsTest.cpp:17:0:
PoldiIndexKnownCompoundsTest.h: In member function ‘void PoldiIndexKnownCompoundsTest::storeRandomWorkspaces(const std::vector<std::__cxx11::basic_string<char> >&)’:
PoldiIndexKnownCompoundsTest.h:674:65: error
parent ef757a8d
No related branches found
No related tags found
No related merge requests found
...@@ -37,13 +37,13 @@ public: ...@@ -37,13 +37,13 @@ public:
/* In this test, peaks from PoldiMockInstrumentHelpers (Silicon) /* In this test, peaks from PoldiMockInstrumentHelpers (Silicon)
* are indexed using theoretical Si-peaks. * are indexed using theoretical Si-peaks.
*/ */
WorkspaceCreationHelper::storeWS( auto wsMeasuredSi =
"measured_SI", PoldiPeakCollectionHelpers::createPoldiPeakTableWorkspace();
PoldiPeakCollectionHelpers::createPoldiPeakTableWorkspace()); WorkspaceCreationHelper::storeWS("measured_SI", wsMeasuredSi);
WorkspaceCreationHelper::storeWS( auto wsSi =
"Si",
PoldiPeakCollectionHelpers::createTheoreticalPeakCollectionSilicon() PoldiPeakCollectionHelpers::createTheoreticalPeakCollectionSilicon()
->asTableWorkspace()); ->asTableWorkspace();
WorkspaceCreationHelper::storeWS("Si", wsSi);
std::string outWSName("PoldiIndexKnownCompoundsTest_OutputWS"); std::string outWSName("PoldiIndexKnownCompoundsTest_OutputWS");
...@@ -670,8 +670,8 @@ private: ...@@ -670,8 +670,8 @@ private:
void storeRandomWorkspaces(const std::vector<std::string> &wsNames) { void storeRandomWorkspaces(const std::vector<std::string> &wsNames) {
for (const auto &wsName : wsNames) { for (const auto &wsName : wsNames) {
WorkspaceCreationHelper::storeWS( auto ws = WorkspaceCreationHelper::create1DWorkspaceRand(10, true)
wsName, WorkspaceCreationHelper::create1DWorkspaceRand(10, true)); WorkspaceCreationHelper::storeWS(wsName, ws);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment