// bdlma_localbufferedobject_cpp03.h                                  -*-C++-*-

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

#ifndef INCLUDED_BDLMA_LOCALBUFFEREDOBJECT_CPP03
#define INCLUDED_BDLMA_LOCALBUFFEREDOBJECT_CPP03

//@PURPOSE: Provide C++03 implementation for bdlma_localbufferedobject.h
//
//@CLASSES: See bdlma_localbufferedobject.h for list of classes
//
//@SEE_ALSO: bdlma_localbufferedobject
//
//@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 Wed Feb 19 10:30:58 2025
// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h

#ifdef COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H

#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC)                    \
                                            std::is_assignable<DST, SRC>::value
#else
#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) true
#endif

namespace BloombergLP {
namespace bdlma {

                        // =========================
                        // class LocalBufferedObject
                        // =========================

/// This `class` contains an object of type `t_TYPE` and a local sequential
/// allocator with an arena size of `t_BUFFER_SIZE`, from which the `t_TYPE`
/// object allocates memory, in a single object.  The
/// `t_DISABLE_DESTRUCTION` template parameter can be used to prevent this
/// `class` from calling `~t_TYPE()` in cases where it is known that
/// `t_TYPE` manages no resources other than memory, since the memory will
/// be adequately managed by the local sequential allocator.
template <class       t_TYPE,
          bsl::size_t t_BUFFER_SIZE         = 1024,
          bool        t_DISABLE_DESTRUCTION = false>
class LocalBufferedObject {

    BSLMF_ASSERT(bslma::UsesBslmaAllocator<t_TYPE>::value);

  public:
    // PUBLIC TYPES
    typedef t_TYPE                  value_type;
    typedef bsl::allocator<>        allocator_type;

    enum { k_BUFFER_SIZE = t_BUFFER_SIZE };   // The `size` template
                                              // parameter to `LocalAllocator`
                                              // takes an `int`, not `size_t`.

  private:
    // DATA
    bdlma::LocalSequentialAllocator<k_BUFFER_SIZE> d_arenaAllocator;
    bsls::ObjectBuffer<value_type>                 d_object;

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

    // PRIVATE MANIPULATORS

    /// Call `d_arenaAllocator.release()`.  If `t_DISABLE_DESTRUCTION` is
    /// `false`, destroy the held object first.
    void destroyHeldObject();

  public:
    // TRAITS
    BSLMF_NESTED_TRAIT_DECLARATION(LocalBufferedObject,
                                   BloombergLP::bslmf::UsesAllocatorArgT);

    // CREATORS
#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
// {{{ BEGIN GENERATED CODE
// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
#endif
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#endif
#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0
    explicit LocalBufferedObject(
                             );
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1
    template <class ARGS_01>
    explicit LocalBufferedObject(
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2
    template <class ARGS_01,
              class ARGS_02>
    explicit LocalBufferedObject(
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                           BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03>
    explicit LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04>
    explicit LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05>
    explicit LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06>
    explicit LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6

#if BDLMA_LOCALBUFFEREDOBJECT_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 LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 7

#if BDLMA_LOCALBUFFEREDOBJECT_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 LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 8

#if BDLMA_LOCALBUFFEREDOBJECT_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 LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 9

#if BDLMA_LOCALBUFFEREDOBJECT_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 LocalBufferedObject(
                           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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 10


#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1
    template <class ARGS_01>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2
    template <class ARGS_01,
              class ARGS_02>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6

#if BDLMA_LOCALBUFFEREDOBJECT_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>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 7

#if BDLMA_LOCALBUFFEREDOBJECT_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>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 8

#if BDLMA_LOCALBUFFEREDOBJECT_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>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 9

#if BDLMA_LOCALBUFFEREDOBJECT_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>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 10

#else
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
    template <class... ARGS>
    explicit LocalBufferedObject(
                             BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)...  args);

    template <class... ARGS>
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        allocator_type                              allocator,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)...  args);
// }}} END GENERATED CODE
#endif

#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
    /// Create the `value_type` object using the specified
    /// `initializer_list` and using the sequential allocator based on a
    /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
    /// local stack memory is exausted, use the default allocator to supply
    /// additional heap memory.
    template <class INIT_LIST_TYPE>
    LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE>  il);

    /// Create the `value_type` object using the specified
    /// `initializer_list` and using the sequential allocator based on a
    /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
    /// local stack memory is exausted, use the specified `allocator` to
    /// supply additional heap memory.
    template <class INIT_LIST_TYPE>
    LocalBufferedObject(bsl::allocator_arg_t                   ,
                        allocator_type                         allocator,
                        std::initializer_list<INIT_LIST_TYPE>  il);

#endif  // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS

    /// Destroy this object and free any memory it uses, and if the
    /// (template parameter) `t_DISABLE_DESTRUCTION` is `true`, do this
    /// *without* calling the destructor of `value_type` (see
    /// `t_DISABLE_DESTRUCTION` template parameter in the component doc).
    ~LocalBufferedObject();

    // MANIPULATORS
// {{{ BEGIN GENERATED CODE
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
    template <class t_ANY_TYPE>
    typename bsl::enable_if<BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(
                               t_TYPE,
                               BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) ),
                            LocalBufferedObject>::type&
    operator=(BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value);
// }}} END GENERATED CODE

    /// Return a pointer providing modifiable access to the underlying
    /// `t_TYPE` object.
    value_type *operator->();

    /// Return a reference providing modifiable access to the underlying
    /// `t_TYPE` object.
    value_type& operator*();

#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
// {{{ BEGIN GENERATED CODE
// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
#endif
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#endif
#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 0
    void emplace();
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 0

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 1
    template <class ARGS_01>
    void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 1

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 2
    template <class ARGS_01,
              class ARGS_02>
    void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 2

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 3
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 3

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 4
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 4

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 5
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 5

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 6
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 6

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 7
    template <class ARGS_01,
              class ARGS_02,
              class ARGS_03,
              class ARGS_04,
              class ARGS_05,
              class ARGS_06,
              class ARGS_07>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 7

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 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>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 8

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 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>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 9

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 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>
    void emplace(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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 10

#else
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
    template <class... ARGS>
    void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args);
// }}} END GENERATED CODE
#endif

#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
    /// Destroy the `value_type` object unless `t_DISABLE_DESTRUCTION` is
    /// true, then release all allocated memory, the re-construct a new
    /// `value_type` object using the specified `il` and using the
    /// sequential allocator based on the local stack buffer.
    template <class INIT_LIST_TYPE>
    void emplace(std::initializer_list<INIT_LIST_TYPE> il);

#endif  // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS

    // ACCESSORS

    /// Return a pointer providing const access to the underlying `t_TYPE`
    /// object.
    const value_type *operator->() const;

    /// Return a reference providing const access to the underlying `t_TYPE`
    /// object.
    const value_type& operator*() const;

    /// Return the alloctor passed at construction, used to provide heap
    /// memory after the local stack buffer is exhausted.  Note that this
    /// is not the arena allocator contained in this object.
    allocator_type get_allocator() const;
};

// ============================================================================
//                       INLINE & TEMPLATE DEFINITIONS
// ============================================================================

                            // -------------------
                            // LocalBufferedObject
                            // -------------------

// PRIVATE MANIPULATORS
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                            destroyHeldObject()
{
    if (!t_DISABLE_DESTRUCTION) {
        d_object.address()->~value_type();
    }
}

// CREATORS
#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
// {{{ BEGIN GENERATED CODE
// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
#endif
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#endif
#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject()
: d_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
: d_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
: d_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(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_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10


#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator)
: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        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_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10

#else
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class... ARGS>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
        LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)...   args)
: d_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                                BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
}

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class... ARGS>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
    LocalBufferedObject(bsl::allocator_arg_t                         ,
                        bsl::allocator<>                             allocator,
                        BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)...   args)
: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                                BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
}
// }}} END GENERATED CODE
#endif

#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class INIT_LIST_TYPE>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE>  il)
: d_arenaAllocator()
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                                il);
}

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class INIT_LIST_TYPE>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
          LocalBufferedObject(bsl::allocator_arg_t                   ,
                              bsl::allocator<>                       allocator,
                              std::initializer_list<INIT_LIST_TYPE>  il)
: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
{
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                                il);
}
#endif  // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                         ~LocalBufferedObject()
{
    destroyHeldObject();
}

// MANIPULATORS
// {{{ BEGIN GENERATED CODE
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class t_ANY_TYPE>
typename bsl::enable_if<
     BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(
                               t_TYPE,
                               BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) ),
     LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION> >::type&
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::operator=(
                           BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value)
{
    d_object.object() = BSLS_COMPILERFEATURES_FORWARD(t_ANY_TYPE, value);

    return *this;
}
// }}} END GENERATED CODE

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
t_TYPE *LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                                   operator->()
{
    return d_object.address();
}

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
t_TYPE& LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                                    operator*()
{
    return d_object.object();
}

#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
// {{{ BEGIN GENERATED CODE
// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
#endif
#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F
#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
#endif
#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 0
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace()
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 0

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 1
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 1

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 2
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 2

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 3
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
                            BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
                              BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03));
}
#endif  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 3

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 4
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 4

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 5
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 5

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 6
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 6

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 7
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class ARGS_01,
          class ARGS_02,
          class ARGS_03,
          class ARGS_04,
          class ARGS_05,
          class ARGS_06,
          class ARGS_07>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 7

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 8
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 8

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 9
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 9

#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 10
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
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>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(
                            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)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                              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  // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 10

#else
// The generated code below is a workaround for the absence of perfect
// forwarding in some compilers.
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class... ARGS>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                       emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                                BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
}
// }}} END GENERATED CODE
#endif

#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
template <class INIT_LIST_TYPE>
void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                              emplace(std::initializer_list<INIT_LIST_TYPE> il)
{
    destroyHeldObject();
    d_arenaAllocator.release();
    bslma::ConstructionUtil::construct(
                                d_object.address(),
                                bslma::AllocatorUtil::adapt(&d_arenaAllocator),
                                il);
}
#endif  // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS

// ACCESSORS
template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
const t_TYPE *
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                             operator->() const
{
    return d_object.address();
}

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
const t_TYPE&
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                              operator*() const
{
    return d_object.object();
}

template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
inline
bsl::allocator<>
LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
                                                          get_allocator() const
{
    return allocator_type(d_arenaAllocator.allocator());
}

#undef BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE

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

#else // if ! defined(DEFINED_BDLMA_LOCALBUFFEREDOBJECT_H)
# error Not valid except when included from bdlma_localbufferedobject.h
#endif // ! defined(COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H)

#endif // ! defined(INCLUDED_BDLMA_LOCALBUFFEREDOBJECT_CPP03)

// ----------------------------------------------------------------------------
// Copyright 2024 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 ----------------------------------
