base: Tag API methods in stl_helpers.hh
Change-Id: Ibc967febfd29444214094883121a66600d80cad8 Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33118 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -43,10 +43,16 @@ class ContainerPrint
|
||||
bool first;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @ingroup api_base_utils
|
||||
*/
|
||||
ContainerPrint(std::ostream &out)
|
||||
: out(out), first(true)
|
||||
{}
|
||||
|
||||
/**
|
||||
* @ingroup api_base_utils
|
||||
*/
|
||||
void
|
||||
operator()(const T &elem)
|
||||
{
|
||||
@@ -60,8 +66,12 @@ class ContainerPrint
|
||||
}
|
||||
};
|
||||
|
||||
// Write out all elements in an stl container as a space separated
|
||||
// list enclosed in square brackets
|
||||
/**
|
||||
* Write out all elements in an stl container as a space separated
|
||||
* list enclosed in square brackets
|
||||
*
|
||||
* @ingroup api_base_utils
|
||||
*/
|
||||
template <template <typename T, typename A> class C, typename T, typename A>
|
||||
std::ostream &
|
||||
operator<<(std::ostream& out, const C<T,A> &vec)
|
||||
|
||||
Reference in New Issue
Block a user