Skip to content

It is just a simple realisation of forward_list. Many methods from original STL container absent here, but it is quite interesting to read to understand how does this container work.

Notifications You must be signed in to change notification settings

Forehm/forward_list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 

Repository files navigation

forward_list

This is just a simple realisation of the forward_list from STL. Many methods from original STL container absent here, but it is still quite interesting to read to understand how this container works :)
I update it and try to do it better :)

Requirements:

C++14 and x86/x64

Functionality:

  1. MyList() - default constructor
  2. ~MyList() - destructor
  3. array like operator T& operator [](const int index) - returns the element via index
  4. GetSize() - return the size of the lis
  5. pop_front() - erases the first element
  6. pop_back() - erases the last element
  7. clear() - erases all elements
  8. push_front(T data) - puts the element data in the beginning of the list
  9. push_back(T data) - puts the element data in the end of the list
  10. insert(T data, const int index) puts the element data in the position before index

About

It is just a simple realisation of forward_list. Many methods from original STL container absent here, but it is quite interesting to read to understand how does this container work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages