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

[19887] Add missing thread include (backport #4045) #4063

Merged
merged 2 commits into from
Dec 11, 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
28 changes: 20 additions & 8 deletions include/fastrtps/types/TypesBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,32 @@ class RTPS_DllAPI ReturnCode_t

};

template<class T>
typename std::enable_if<std::is_arithmetic<T>::value || std::is_enum<T>::value, bool>::type
operator ==(
T a,
RTPS_DllAPI inline bool operator ==(
ReturnCode_t::ReturnCodeValue a,
const ReturnCode_t& b)
{
return b.operator ==(
a);
}

template<class T>
typename std::enable_if<std::is_arithmetic<T>::value || std::is_enum<T>::value, bool>::type
operator !=(
T a,
RTPS_DllAPI inline bool operator !=(
ReturnCode_t::ReturnCodeValue a,
const ReturnCode_t& b)
{
return b.operator !=(
a);
}

RTPS_DllAPI inline bool operator ==(
uint32_t a,
const ReturnCode_t& b)
{
return b.operator ==(
a);
}

RTPS_DllAPI inline bool operator !=(
uint32_t a,
const ReturnCode_t& b)
{
return b.operator !=(
Expand Down
13 changes: 7 additions & 6 deletions test/blackbox/common/BlackboxTestsDeadlineQos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/utils/TimeConversion.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;

Expand Down
10 changes: 6 additions & 4 deletions test/blackbox/common/BlackboxTestsPubSubFlowControllers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "PubSubWriterReader.hpp"
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include <gtest/gtest.h>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
9 changes: 5 additions & 4 deletions test/blackbox/common/BlackboxTestsPubSubFragments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <thread>

#include <fastdds/dds/log/Log.hpp>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <rtps/transport/test_UDPv4Transport.h>

using namespace eprosima::fastrtps;
Expand Down
9 changes: 5 additions & 4 deletions test/blackbox/common/BlackboxTestsPubSubHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
// limitations under the License.

#include <atomic>
#include <thread>
#include <tuple>

#include "BlackboxTests.hpp"
#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

#include <fastrtps/xmlparser/XMLProfileManager.h>
#include <rtps/transport/test_UDPv4Transport.h>
#include <gtest/gtest.h>

using namespace eprosima::fastrtps;
using namespace eprosima::fastdds::rtps;
Expand Down
9 changes: 5 additions & 4 deletions test/blackbox/common/BlackboxTestsReliability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/utils/TimeConversion.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <rtps/transport/test_UDPv4Transport.h>

using namespace eprosima::fastrtps;
Expand Down
13 changes: 5 additions & 8 deletions test/blackbox/common/DDSBlackboxTestsContentFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,23 @@
// limitations under the License.

#include <atomic>
#include <thread>

#include <gtest/gtest.h>

#include <fastdds/dds/subscriber/DataReader.hpp>
#include <fastdds/dds/subscriber/Subscriber.hpp>
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>

#include <fastdds/dds/subscriber/Subscriber.hpp>
#include <fastdds/rtps/transport/test_UDPv4TransportDescriptor.h>

#include <fastrtps/attributes/LibrarySettingsAttributes.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

#include "../types/HelloWorldTypeObject.h"
#include "../types/TestRegression3361PubSubTypes.h"
#include "../types/TestRegression3361TypeObject.h"
#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

namespace eprosima {
namespace fastdds {
Expand Down
10 changes: 6 additions & 4 deletions test/blackbox/common/DDSBlackboxTestsDataReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubParticipant.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include <gtest/gtest.h>

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
15 changes: 8 additions & 7 deletions test/blackbox/common/DDSBlackboxTestsDataSharing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <fstream>
#include <sstream>
#include <thread>

#include <fastrtps/log/Log.h>
#include <gtest/gtest.h>

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <fastrtps/log/Log.h>
#include <fastrtps/transport/test_UDPv4TransportDescriptor.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include <sstream>
#include <fstream>
#include <gtest/gtest.h>
#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
1 change: 1 addition & 0 deletions test/blackbox/common/DDSBlackboxTestsListeners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include <set>
#include <thread>
#include <vector>

#include <fastdds/dds/core/condition/GuardCondition.hpp>
Expand Down
11 changes: 6 additions & 5 deletions test/blackbox/common/DDSBlackboxTestsOwnershipQos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include <thread>

#include <gtest/gtest.h>

#include <fastrtps/xmlparser/XMLProfileManager.h>
#include <fastrtps/transport/test_UDPv4TransportDescriptor.h>
#include <fastrtps/xmlparser/XMLProfileManager.h>

#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
14 changes: 8 additions & 6 deletions test/blackbox/common/DDSBlackboxTestsPersistence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "BlackboxTests.hpp"
#include <thread>

#include <gtest/gtest.h>

#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include <fastrtps/xmlparser/XMLProfileManager.h>
#include <fastrtps/log/Log.h>

#include <gtest/gtest.h>
#include "BlackboxTests.hpp"
#include "PubSubReader.hpp"
#include "PubSubWriter.hpp"
#include "ReqRepAsReliableHelloWorldReplier.hpp"
#include "ReqRepAsReliableHelloWorldRequester.hpp"

using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
Expand Down
Loading
Loading