Add ASIO_NO_EXTENSIONS to disable the non-TS parts of the API.
diff --git a/asio/include/asio/basic_socket.hpp b/asio/include/asio/basic_socket.hpp
index 5282906..b6f6f6f 100644
--- a/asio/include/asio/basic_socket.hpp
+++ b/asio/include/asio/basic_socket.hpp
@@ -77,8 +77,10 @@
   /// The endpoint type.
   typedef typename Protocol::endpoint endpoint_type;
 
+#if !defined(ASIO_NO_EXTENSIONS)
   /// A basic_socket is always the lowest layer.
   typedef basic_socket<Protocol ASIO_SVC_TARG> lowest_layer_type;
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
   /// Construct a basic_socket without opening it.
   /**
@@ -278,6 +280,7 @@
   }
 #endif // defined(ASIO_ENABLE_OLD_SERVICES)
 
+#if !defined(ASIO_NO_EXTENSIONS)
   /// Get a reference to the lowest layer.
   /**
    * This function returns a reference to the lowest layer in a stack of
@@ -305,6 +308,7 @@
   {
     return *this;
   }
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
   /// Open the socket using the specified protocol.
   /**
diff --git a/asio/include/asio/basic_socket_acceptor.hpp b/asio/include/asio/basic_socket_acceptor.hpp
index df4fb23..d1ace2f 100644
--- a/asio/include/asio/basic_socket_acceptor.hpp
+++ b/asio/include/asio/basic_socket_acceptor.hpp
@@ -1067,6 +1067,7 @@
 #endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
 
+#if !defined(ASIO_NO_EXTENSIONS)
   /// Accept a new connection.
   /**
    * This function is used to accept a new connection from a peer into the
@@ -1350,6 +1351,7 @@
     return init.result.get();
 #endif // defined(ASIO_ENABLE_OLD_SERVICES)
   }
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
   /// Accept a new connection.
diff --git a/asio/include/asio/io_context.hpp b/asio/include/asio/io_context.hpp
index 9aa14af..03d7701 100644
--- a/asio/include/asio/io_context.hpp
+++ b/asio/include/asio/io_context.hpp
@@ -161,7 +161,9 @@
 
   class service;
 
+#if !defined(ASIO_NO_EXTENSIONS)
   class strand;
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
   /// The type used to count the number of handlers executed by the context.
   typedef std::size_t count_type;
@@ -819,8 +821,10 @@
 
 // If both io_context.hpp and strand.hpp have been included, automatically
 // include the header file needed for the io_context::strand class.
-#if defined(ASIO_STRAND_HPP)
-# include "asio/io_context_strand.hpp"
-#endif // defined(ASIO_STRAND_HPP)
+#if !defined(ASIO_NO_EXTENSIONS)
+# if defined(ASIO_STRAND_HPP)
+#  include "asio/io_context_strand.hpp"
+# endif // defined(ASIO_STRAND_HPP)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 #endif // ASIO_IO_CONTEXT_HPP
diff --git a/asio/include/asio/io_context_strand.hpp b/asio/include/asio/io_context_strand.hpp
index 3b4b3c9..53a6c46 100644
--- a/asio/include/asio/io_context_strand.hpp
+++ b/asio/include/asio/io_context_strand.hpp
@@ -16,6 +16,9 @@
 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
 #include "asio/detail/config.hpp"
+
+#if !defined(ASIO_NO_EXTENSIONS)
+
 #include "asio/async_result.hpp"
 #include "asio/detail/handler_type_requirements.hpp"
 #include "asio/detail/strand_service.hpp"
@@ -374,4 +377,6 @@
 
 #include "asio/detail/pop_options.hpp"
 
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
 #endif // ASIO_IO_CONTEXT_STRAND_HPP
diff --git a/asio/include/asio/strand.hpp b/asio/include/asio/strand.hpp
index 751ef35..c70162b 100644
--- a/asio/include/asio/strand.hpp
+++ b/asio/include/asio/strand.hpp
@@ -277,8 +277,10 @@
 
 // If both io_context.hpp and strand.hpp have been included, automatically
 // include the header file needed for the io_context::strand class.
-#if defined(ASIO_IO_CONTEXT_HPP)
-# include "asio/io_context_strand.hpp"
-#endif // defined(ASIO_IO_CONTEXT_HPP)
+#if !defined(ASIO_NO_EXTENSIONS)
+# if defined(ASIO_IO_CONTEXT_HPP)
+#  include "asio/io_context_strand.hpp"
+# endif // defined(ASIO_IO_CONTEXT_HPP)
+#endif // !defined(ASIO_NO_EXTENSIONS)
 
 #endif // ASIO_STRAND_HPP