Issue 18644: DataReader.hpp, ContentFilteredTopic.hpp, Topic.hpp, TopicDescription.hpp o not compile with MS Visual Studio (dds-psm-cxx-rtf) Source: Micro Focus (Mr. Simon McQueen, simon.mcqueen(at)microfocus.com) Nature: Uncategorized Issue Severity: Summary: In src/hpp/dds/sub/DataReader.hpp; src/hpp/dds/topic/ContentFilteredTopic.hpp; src/hpp/dds/topic/Topic.hpp; src/hpp/dds/topic/TopicDescription.hpp ... the template header file includes need to be moved as MSVC appears to ignore any attempt to 're-declare' a template class with a 'new' default argument and only considers defaults on the first time of asking. Without the move the compiler emits an error in each case like something like e.g.: dds/topic/detail/AnyTopicDescription.hpp(48): error C2976: 'dds::topic::TopicDescription' : too few template arguments dds/topic/TTopicDescription.hpp(41) : see declaration of 'dds::topic::TopicDescription' _Suggested resolutions_: diff --git a/src/hpp/dds/sub/DataReader.hpp b/src/hpp/dds/sub/DataReader.hpp index b38ddaa..b476779 100644 --- a/src/hpp/dds/sub/DataReader.hpp +++ b/src/hpp/dds/sub/DataReader.hpp @@ -1,10 +1,8 @@ #ifndef OMG_DDS_SUB_DATA_READER_HPP_ #define OMG_DDS_SUB_DATA_READER_HPP_ -#include <dds/sub/TDataReader.hpp> #include <dds/sub/detail/DataReader.hpp> - namespace dds { namespace sub { template <typename T, @@ -15,6 +13,7 @@ namespace dds { } } +#include <dds/sub/TDataReader.hpp> // = Manipulators namespace dds { diff --git a/src/hpp/dds/topic/ContentFilteredTopic.hpp b/src/hpp/dds/topic/ContentFilteredTopic.hpp index 057a2f6..cbc5cfc 100644 --- a/src/hpp/dds/topic/ContentFilteredTopic.hpp +++ b/src/hpp/dds/topic/ContentFilteredTopic.hpp @@ -20,11 +20,12 @@ */ #include <dds/topic/detail/ContentFilteredTopic.hpp> -#include <dds/topic/TContentFilteredTopic.hpp> namespace dds { namespace topic { template <typename T, template <typename Q> class DELEGATE = dds::topic::detail::ContentFilteredTopic> class ContentFilteredTopic; } } +#include <dds/topic/TContentFilteredTopic.hpp> + #endif /* OMG_DDS_TOPIC_CONTENT_FILTERED_TOPIC_HPP_ */ diff --git a/src/hpp/dds/topic/Topic.hpp b/src/hpp/dds/topic/Topic.hpp index cd69316..5545f76 100644 --- a/src/hpp/dds/topic/Topic.hpp +++ b/src/hpp/dds/topic/Topic.hpp @@ -2,11 +2,12 @@ #define OMG_DDS_TOPIC_TOPIC_HPP_ #include <dds/topic/detail/Topic.hpp> -#include <dds/topic/TTopic.hpp> namespace dds { namespace topic { template <typename T, template <typename Q> class DELEGATE = dds::topic::detail::Topic> class Topic; } } +#include <dds/topic/TTopic.hpp> + #endif /* OMG_DDS_TOPIC_TOPIC_HPP_ */ diff --git a/src/hpp/dds/topic/TopicDescription.hpp b/src/hpp/dds/topic/TopicDescription.hpp index 47e2dd1..6e908b0 100644 --- a/src/hpp/dds/topic/TopicDescription.hpp +++ b/src/hpp/dds/topic/TopicDescription.hpp @@ -20,7 +20,6 @@ */ #include <dds/topic/detail/TopicDescription.hpp> -#include <dds/topic/TTopicDescription.hpp> namespace dds { namespace topic { template <typename T, @@ -28,5 +27,6 @@ namespace dds { namespace topic { class TopicDescription; } } +#include <dds/topic/TTopicDescription.hpp> #endif /* OMG_DDS_TOPIC_TOPIC_DESCRIPTION_HPP_ */ Resolution: Revised Text: Actions taken: April 9, 2013: received issue Discussion: End of Annotations:===== ogle-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=EQOpO5RDlXp608DEAp8AWzX1pZn76LLo+Xe7w2eN8Sk=; b=hNzl09R0UtA8MnaUG5XaDFtidOz/Eh8fSINvmBek9P59P7PMwpE4z08S/eNcD3WKlC 8HGeNiMynNcrchAWZuenXVInagyQDcL14nUPt8Y10VpN7zBK2jXXESVI1ctY9KpJe7X3 jh9wKRUWps3jeJtZusBwXZF77NxvxFcpDKcNIJGQ/80LWXl9FhMytLNat5wtpT2p5YJF eJrtiK34nOlk1BphnmKuo3Ajd6bU+khU3+3k8Z90woISUkuRyEfZcbd6gVo95jIGjnRm 8bvFBvS1m55oIUmrkNloCtnvL9cO9Zk1f1H0MDQbr5T6c/Eoirl1fVpTMxtSYCroRIfW fQxg== X-Received: by 10.180.188.3 with SMTP id fw3mr20168553wic.33.1365520050050; Tue, 09 Apr 2013 08:07:30 -0700 (PDT) Date: Tue, 09 Apr 2013 16:07:18 +0100 From: Simon McQueen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 To: issues@omg.org Subject: DataReader.hpp, ContentFilteredTopic.hpp, Topic.hpp, TopicDescription.hpp do not compile with MS Visual Studio X-Gm-Message-State: ALoCoQnAKlDm1bDLjuYNXCI1AIUnwkPfcuMVqqyyWAiW8pLbipA6XhbWrBO7MyKwNpa368bwEvLP X-Virus-Scanned: amavisd-new at omg.org X-Brightmail-Tracker: AAAAAR15SuM= X-Brightmail-Tracker: AAAAAA== Name: Simon McQueen Employer: PrismTech Specification: DDS CXX PSM RTF FormalNumber: ptc/12-10-03 Nature: Revision _Issues_: In src/hpp/dds/sub/DataReader.hpp; src/hpp/dds/topic/ContentFilteredTopic.hpp; src/hpp/dds/topic/Topic.hpp; src/hpp/dds/topic/TopicDescription.hpp ... the template header file includes need to be moved as MSVC appears to ignore any attempt to 're-declare' a template class with a 'new' default argument and only considers defaults on the first time of asking. Without the move the compiler emits an error in each case like something like e.g.: dds/topic/detail/AnyTopicDescription.hpp(48): error C2976: 'dds::topic::TopicDescription' : too few template arguments dds/topic/TTopicDescription.hpp(41) : see declaration of 'dds::topic::TopicDescription' _Suggested resolutions_: diff --git a/src/hpp/dds/sub/DataReader.hpp b/src/hpp/dds/sub/DataReader.hpp index b38ddaa..b476779 100644 --- a/src/hpp/dds/sub/DataReader.hpp +++ b/src/hpp/dds/sub/DataReader.hpp @@ -1,10 +1,8 @@ #ifndef OMG_DDS_SUB_DATA_READER_HPP_ #define OMG_DDS_SUB_DATA_READER_HPP_ -#include #include - namespace dds { namespace sub { template // = Manipulators namespace dds { diff --git a/src/hpp/dds/topic/ContentFilteredTopic.hpp b/src/hpp/dds/topic/ContentFilteredTopic.hpp index 057a2f6..cbc5cfc 100644 --- a/src/hpp/dds/topic/ContentFilteredTopic.hpp +++ b/src/hpp/dds/topic/ContentFilteredTopic.hpp @@ -20,11 +20,12 @@ */ #include -#include namespace dds { namespace topic { template class DELEGATE = dds::topic::detail::ContentFilteredTopic> class ContentFilteredTopic; } } +#include + #endif /* OMG_DDS_TOPIC_CONTENT_FILTERED_TOPIC_HPP_ */ diff --git a/src/hpp/dds/topic/Topic.hpp b/src/hpp/dds/topic/Topic.hpp index cd69316..5545f76 100644 --- a/src/hpp/dds/topic/Topic.hpp +++ b/src/hpp/dds/topic/Topic.hpp @@ -2,11 +2,12 @@ #define OMG_DDS_TOPIC_TOPIC_HPP_ #include -#include namespace dds { namespace topic { template class DELEGATE = dds::topic::detail::Topic> class Topic; } } +#include + #endif /* OMG_DDS_TOPIC_TOPIC_HPP_ */ diff --git a/src/hpp/dds/topic/TopicDescription.hpp b/src/hpp/dds/topic/TopicDescription.hpp index 47e2dd1..6e908b0 100644 --- a/src/hpp/dds/topic/TopicDescription.hpp +++ b/src/hpp/dds/topic/TopicDescription.hpp @@ -20,7 +20,6 @@ */ #include -#include namespace dds { namespace topic { template #endif /* OMG_DDS_TOPIC_TOPIC_DESCRIPTION_HPP_ */