Index: boost/archive/detail/register_archive.hpp
===================================================================
--- boost/archive/detail/register_archive.hpp	(revision 51283)
+++ boost/archive/detail/register_archive.hpp	(working copy)
@@ -28,6 +28,44 @@
     typedef int type;
 };
 
+#ifdef __SUNPRO_CC
+
+template<int N>
+struct counter : counter<N-1> {};
+template<>
+struct counter<0> {};
+
+template<class Serializable>
+void instantiate_ptr_serialization(Serializable* s, int, adl_tag) {
+    instantiate_ptr_serialization(s, counter<20>());
+}
+
+template<class Archive>
+struct get_counter {
+    static const int value = sizeof(adjust_counter(counter<20>()));
+    typedef counter<value> type;
+    typedef counter<value - 1> prior;
+    typedef char (&next)[value+1];
+};
+
+char adjust_counter(counter<0>);
+template<class Serializable>
+void instantiate_ptr_serialization(Serializable*, counter<0>) {}
+
+#define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive)                     \
+namespace boost { namespace archive { namespace detail {                  \
+    get_counter<Archive>::next adjust_counter(get_counter<Archive>::type);\
+    template<class Serializable>                                          \
+    void instantiate_ptr_serialization(Serializable* s,                   \
+        get_counter<Archive>::type) {                                     \
+        ptr_serialization_support<Archive, Serializable> x;               \
+        instantiate_ptr_serialization(s, get_counter<Archive>::prior());  \
+    }\
+}}}
+
+
+#else
+
 // This function gets called, but its only purpose is to participate
 // in overload resolution with the functions declared by
 // BOOST_SERIALIZATION_REGISTER_ARCHIVE, below.
@@ -48,6 +86,8 @@
                                                                         \
 }}}
 
+#endif
+
 }}} // namespace boost::archive::detail
 
 #endif // BOOST_ARCHIVE_DETAIL_INSTANTIATE_SERIALIZE_DWA2006521_HPP
