Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::array_type< JElement_t, JAllocator_t > Struct Template Reference

Auxiliary data structure for return type of make methods. More...

#include <JVectorize.hh>

Inheritance diagram for JLANG::array_type< JElement_t, JAllocator_t >:
std::vector< JElement_t, JAllocator_t >

Public Member Functions

const array_typeoperator-> () const
 Smart pointer.
 

Friends

std::ostream & operator<< (std::ostream &out, const array_type &object)
 Write array to output stream.
 

Detailed Description

template<class JElement_t, class JAllocator_t = std::allocator<JElement_t>>
struct JLANG::array_type< JElement_t, JAllocator_t >

Auxiliary data structure for return type of make methods.

Definition at line 26 of file JVectorize.hh.

Member Function Documentation

◆ operator->()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
const array_type * JLANG::array_type< JElement_t, JAllocator_t >::operator-> ( ) const
inline

Smart pointer.

Returns
pointer to static object

Definition at line 34 of file JVectorize.hh.

35 {
36 static array_type buffer;
37
38 buffer.assign(this->begin(), this->end());
39
40 return &buffer;
41 }

Friends And Related Symbol Documentation

◆ operator<<

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
std::ostream & operator<< ( std::ostream & out,
const array_type< JElement_t, JAllocator_t > & object )
friend

Write array to output stream.

Parameters
outoutput stream
objectarray
Returns
output stream

Definition at line 51 of file JVectorize.hh.

52 {
53 for (typename array_type::const_iterator i = object.begin(); i != object.end(); ++i) {
54 out << ' ' << *i;
55 }
56
57 return out;
58 }

The documentation for this struct was generated from the following file: