// bslma_sharedptrinplacerep_cpp03.h                                  -*-C++-*-

// Automatically generated file.  **DO NOT EDIT**

#ifndef INCLUDED_BSLMA_SHAREDPTRINPLACEREP_CPP03
#define INCLUDED_BSLMA_SHAREDPTRINPLACEREP_CPP03

//@PURPOSE: Provide C++03 implementation for bslma_sharedptrinplacerep.h
//
//@CLASSES: See bslma_sharedptrinplacerep.h for list of classes
//
//@SEE_ALSO: bslma_sharedptrinplacerep
//
//@DESCRIPTION:  This component is the C++03 translation of a C++11 component,
// generated by the 'sim_cpp11_features.pl' program.  If the original header
// contains any specially delimited regions of C++11 code, then this generated
// file contains the C++03 equivalent, i.e., with variadic templates expanded
// and rvalue-references replaced by 'bslmf::MovableRef' objects.  The header
// code in this file is designed to be '#include'd into the original header
// when compiling with a C++03 compiler.  If there are no specially delimited
// regions of C++11 code, then this header contains no code and is not
// '#include'd in the original header.
//
// Generated on Sun Sep  1 05:38:38 2024
// Command line: sim_cpp11_features.pl bslma_sharedptrinplacerep.h

#ifdef COMPILING_BSLMA_SHAREDPTRINPLACEREP_H

namespace BloombergLP {
namespace bslma {

                      // =========================
                      // class SharedPtrInplaceRep
                      // =========================

/// This class provides a concrete implementation of the `SharedPtrRep`
/// protocol for "in-place" instances of the parameterized `TYPE`.  Upon
/// destruction of this object, the destructor of `TYPE` is invoked.
template <class TYPE>
class SharedPtrInplaceRep : public SharedPtrRep {

    // DATA
    Allocator *d_allocator_p; // memory allocator (held, not owned)

    TYPE       d_instance;    // Beginning of the in-place buffer.  Note that
                              // this must be last in this layout to allow for
                              // the possibility of creating in-place
                              // uninitialized buffer, where it is possible to
                              // access memory beyond the 'd_instance'
                              // footprint (refer to 'bsl::shared_ptr::
                              // createInplaceUninitializedBuffer' for sample
                              // usage)

  private:
    // NOT IMPLEMENTED
    SharedPtrInplaceRep(const SharedPtrInplaceRep&);
    SharedPtrInplaceRep& operator=(const SharedPtrInplaceRep&);

    // PRIVATE CREATORS

    /// Destroy this representation object and the embedded instance of
    /// parameterized `TYPE`.  Note that this destructor is never called.
    /// Instead, `disposeObject` destroys the in-place object and
    /// `disposeRep` deallocates this representation object (including the
    /// shared object's footprint).
    ~SharedPtrInplaceRep() BSLS_KEYWORD_OVERRIDE;

  public:
    // CREATORS
#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
// {{{ BEGIN GENERATED CODE
// Command line: sim_cpp11_features.pl bslma_sharedptrinplacerep.h
#ifndef BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT
#define BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT 14
#endif
#ifndef BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A
#define BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT
#endif

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 0
    explicit SharedPtrInplaceRep(Allocator *basicAllocator);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 0

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 1
    template <class ARGS_01>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 1

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 2
    template <class ARGS_01,
              class ARGS_02>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 2

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 3
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 3

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 4
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 4

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 5
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 5

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 6
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 6

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 7
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 7

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 8
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 8

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 9
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08,
              class ARGS_09>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 9

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 10
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08,
              class ARGS_09,
              class ARGS_10>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 10

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 11
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08,
              class ARGS_09,
              class ARGS_10,
              class ARGS_11>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 11

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 12
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08,
              class ARGS_09,
              class ARGS_10,
              class ARGS_11,
              class ARGS_12>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) args_12);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 12

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 13
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08,
              class ARGS_09,
              class ARGS_10,
              class ARGS_11,
              class ARGS_12,
              class ARGS_13>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) args_12,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) args_13);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 13

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 14
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07,
              class ARGS_08,
              class ARGS_09,
              class ARGS_10,
              class ARGS_11,
              class ARGS_12,
              class ARGS_13,
              class ARGS_14>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) args_12,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) args_13,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) args_14);
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_A >= 14

#else
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.

    template <class... ARGS>
    explicit SharedPtrInplaceRep(Allocator *basicAllocator,
                              BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args);
// }}} END GENERATED CODE
#endif

    // MANIPULATORS

    /// Destroy the object being referred to by this representation.  This
    /// method is automatically invoked by `releaseRef` when the number of
    /// shared references reaches zero and should not be explicitly invoked
    /// otherwise.  Note that this function calls the destructor for the
    /// shared object, but does not deallocate its footprint.
    void disposeObject() BSLS_KEYWORD_OVERRIDE;

    /// Deallocate the memory associated with this representation object
    /// (including the shared object's footprint).  This method is
    /// automatically invoked by `releaseRef` and `releaseWeakRef` when the
    /// number of weak references and the number of shared references both
    /// reach zero and should not be explicitly invoked otherwise.  The
    /// behavior is undefined unless `disposeObject` has already been called
    /// for this representation.  Note that this `disposeRep` method
    /// effectively serves as the representation object's destructor.
    void disposeRep() BSLS_KEYWORD_OVERRIDE;

    /// Return a null pointer.  Note that the specified `type` is not used
    /// as an in-place representation for a shared pointer can never store a
    /// user-supplied deleter (there is no function that might try to create
    /// one).
    void *getDeleter(const std::type_info& type) BSLS_KEYWORD_OVERRIDE;

    /// Return the address of the modifiable (in-place) object referred to
    /// by this representation object.
    TYPE *ptr();

    // ACCESSORS

    /// Return the (untyped) address of the modifiable (in-place) object
    /// referred to by this representation object.
    void *originalPtr() const BSLS_KEYWORD_OVERRIDE;
};

                        //============================
                        // SharedPtrInplaceRep_ImpUtil
                        //============================

/// This struct provides a namespace for several static methods that ease
/// the implementation of many methods of the `SharedPtrInplaceRep` class.
struct SharedPtrInplaceRep_ImpUtil {

    // CLASS METHODS

    /// Return the specified `reference`.  Note that this pair of overloaded
    /// functions is necessary to correctly forward movable references when
    /// providing explicit move-semantics for C++03; otherwise the
    /// `MovableRef` is likely to be wrapped in multiple layers of reference
    /// wrappers, and not be recognized as the movable vocabulary type.
    template <class TYPE>
    static const TYPE& forward(const TYPE& reference);
    template <class TYPE>
    static BloombergLP::bslmf::MovableRef<TYPE> forward(
                        const BloombergLP::bslmf::MovableRef<TYPE>& reference);

    /// Return the specified `address` cast as a pointer to `void`, even if
    /// (the template parameter) `TYPE` is cv-qualified.
    template <class TYPE>
    static void *voidify(TYPE *address);

    /// Destroy the specified `object`.
    template <class TYPE>
    static void dispose(const TYPE& object);

    /// Destroy each element of the specified `object`.
    template <class TYPE, size_t SIZE>
    static void dispose(const TYPE (&object)[SIZE]);
};

// ============================================================================
//                          INLINE DEFINITIONS
// ============================================================================


                        // ---------------------------
                        // SharedPtrInplaceRep_ImpUtil
                        // ---------------------------

template <class TYPE>
inline
const TYPE& SharedPtrInplaceRep_ImpUtil::forward(const TYPE& reference)
{
    return reference;
}

template <class TYPE>
inline
BloombergLP::bslmf::MovableRef<TYPE> SharedPtrInplaceRep_ImpUtil::forward(
                         const BloombergLP::bslmf::MovableRef<TYPE>& reference)
{
    return reference;
}

template <class TYPE>
inline
void *SharedPtrInplaceRep_ImpUtil::voidify(TYPE *address) {
    return static_cast<void *>(
            const_cast<typename bsl::remove_cv<TYPE>::type *>(address));
}

template <class TYPE>
inline
void SharedPtrInplaceRep_ImpUtil::dispose(const TYPE& object)
{
    object.~TYPE();
}

template <class TYPE, size_t SIZE>
inline
void SharedPtrInplaceRep_ImpUtil::dispose(const TYPE (&object)[SIZE])
{
    for (size_t i = 0; i < SIZE; ++i) {
        dispose(object[i]);
    }
}

                        // -------------------------
                        // class SharedPtrInplaceRep
                        // -------------------------

// CREATORS
#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
// {{{ BEGIN GENERATED CODE
// Command line: sim_cpp11_features.pl bslma_sharedptrinplacerep.h
#ifndef BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT
#define BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT 14
#endif
#ifndef BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B
#define BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT
#endif
#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 0
template <class TYPE>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator)
: d_allocator_p(basicAllocator)
, d_instance()
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 0

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 1
template <class TYPE>
template <class ARGS_01>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 1

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 2
template <class TYPE>
template <class ARGS_01,
          class ARGS_02>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 2

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 3
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 3

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 4
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 4

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 5
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 5

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 6
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 6

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 7
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 7

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 8
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 8

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 9
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08,
          class ARGS_09>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_09,args_09))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 9

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 10
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08,
          class ARGS_09,
          class ARGS_10>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_09,args_09),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_10,args_10))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 10

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 11
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08,
          class ARGS_09,
          class ARGS_10,
          class ARGS_11>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_09,args_09),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_10,args_10),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_11,args_11))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 11

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 12
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08,
          class ARGS_09,
          class ARGS_10,
          class ARGS_11,
          class ARGS_12>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) args_12)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_09,args_09),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_10,args_10),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_11,args_11),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_12,args_12))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 12

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 13
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08,
          class ARGS_09,
          class ARGS_10,
          class ARGS_11,
          class ARGS_12,
          class ARGS_13>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) args_12,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) args_13)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_09,args_09),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_10,args_10),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_11,args_11),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_12,args_12),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_13,args_13))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 13

#if BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 14
template <class TYPE>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07,
          class ARGS_08,
          class ARGS_09,
          class ARGS_10,
          class ARGS_11,
          class ARGS_12,
          class ARGS_13,
          class ARGS_14>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_11) args_11,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_12) args_12,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_13) args_13,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_14) args_14)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS_01,args_01),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_02,args_02),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_03,args_03),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_04,args_04),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_05,args_05),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_06,args_06),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_07,args_07),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_08,args_08),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_09,args_09),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_10,args_10),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_11,args_11),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_12,args_12),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_13,args_13),
             BSLS_COMPILERFEATURES_FORWARD(ARGS_14,args_14))
{
}
#endif  // BSLMA_SHAREDPTRINPLACEREP_VARIADIC_LIMIT_B >= 14

#else
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
template <class TYPE>
template <class... ARGS>
SharedPtrInplaceRep<TYPE>::SharedPtrInplaceRep(Allocator *basicAllocator,
                               BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
: d_allocator_p(basicAllocator)
, d_instance(BSLS_COMPILERFEATURES_FORWARD(ARGS,args)...)
{
}
// }}} END GENERATED CODE
#endif

template <class TYPE>
SharedPtrInplaceRep<TYPE>::~SharedPtrInplaceRep()
{
    BSLS_ASSERT(0);
}

// MANIPULATORS
template <class TYPE>
inline
void SharedPtrInplaceRep<TYPE>::disposeObject()
{
    SharedPtrInplaceRep_ImpUtil::dispose(d_instance);
}

template <class TYPE>
inline
void SharedPtrInplaceRep<TYPE>::disposeRep()
{
    d_allocator_p->deallocate(this);
}

template <class TYPE>
inline
void *SharedPtrInplaceRep<TYPE>::getDeleter(const std::type_info&)
{
    return 0;
}

template <class TYPE>
inline
TYPE *SharedPtrInplaceRep<TYPE>::ptr()
{
    return bsls::Util::addressOf(d_instance);
}

// ACCESSORS
template <class TYPE>
inline
void *SharedPtrInplaceRep<TYPE>::originalPtr() const
{
    return const_cast<void *>(static_cast<const void *>(
                                           bsls::Util::addressOf(d_instance)));
}

// ============================================================================
//                              TYPE TRAITS
// ============================================================================

/// The class template `SharedPtrInplaceRep` appears to use allocators, but
/// passes its allocator argument in the first position, rather than in the
/// last position, so is not compatible with BDE APIs that use this trait.
template <class ELEMENT_TYPE>
struct UsesBslmaAllocator<SharedPtrInplaceRep<ELEMENT_TYPE> >
    : bsl::false_type {
};

}  // close package namespace
}  // close enterprise namespace

#else // if ! defined(DEFINED_BSLMA_SHAREDPTRINPLACEREP_H)
# error Not valid except when included from bslma_sharedptrinplacerep.h
#endif // ! defined(COMPILING_BSLMA_SHAREDPTRINPLACEREP_H)

#endif // ! defined(INCLUDED_BSLMA_SHAREDPTRINPLACEREP_CPP03)

// ----------------------------------------------------------------------------
// Copyright 2013 Bloomberg Finance L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------- END-OF-FILE ----------------------------------
