Commits

alamaison  committed 6482d80

Fixed bizarre header interaction.

Including variant.h at the bottom of bstr.h prevented datetime.h from compiling on its own! Removed the include as well as several unused forward-decls. Added a test case to verify this works.

  • Participants
  • Parent commits 544d17e

Comments (0)

Files changed (3)

File include/comet/bstr.h

 
 namespace comet {
 
-	class datetime_t;
-	class currency_t;
-	template<typename T> class com_ptr;
-	template<typename T> class safearray_t;
-
-	// Forward declaration
-//	class variant_t;
-
 #ifndef NORM_IGNOREKASHIDA
 #define	 NORM_IGNOREKASHIDA 0x00040000
 #endif // NORM_IGNOREKASHIDA
 			assign(first, last);
 		}
 
-//		bstr_t(const variant_t& v) throw(std::bad_alloc);
-
 		explicit bstr_t(const uuid_t& u, bool braces = false)
 		{
 			construct(u, braces);
 		/// \name Boolean operators
 		//@{
 
-/*		bool operator!=(const variant_t&) const;
-		bool operator==(const variant_t&) const;
-		bool operator<(const variant_t&) const;
-		bool operator>(const variant_t&) const;
-		bool operator<=(const variant_t&) const;
-		bool operator>=(const variant_t&) const;
-*/
 		bool operator==(const wchar_t* s) const
 		{ return 0 == wcscmp(c_str(), impl::null_to_empty(s) ) && is_regular(); }
 
 	template<> inline void swap( comet::bstr_t& x, comet::bstr_t& y) COMET_STD_SWAP_NOTHROW { x.swap(y); }
 }
 
-#include <comet/variant.h>
 #include <comet/uuid.h>
 
 #pragma warning(pop)

File src/test/Test.vcproj

 				>
 			</File>
 			<File
+				RelativePath="test16.cpp"
+				>
+			</File>
+			<File
 				RelativePath="test2.cpp"
 				>
 			</File>

File src/test/test16.cpp

+#include <comet/datetime.h>