Temporarily remove include for vector pointer code

This commit is contained in:
John Wellbelove 2016-06-28 21:02:38 +01:00
parent 66d100f166
commit 70771d0768
3 changed files with 74 additions and 78 deletions

View File

@ -134,90 +134,90 @@ namespace etl
};
//***************************************************************************
/// A vector implementation that uses a fixed size buffer.
///\tparam T The element type.
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
///\ingroup vector
//***************************************************************************
template <typename T, const size_t MAX_SIZE_>
class vector<T*, MAX_SIZE_> : public ivector<T*>
{
public:
////***************************************************************************
///// A vector implementation that uses a fixed size buffer.
/////\tparam T The element type.
/////\tparam MAX_SIZE_ The maximum number of elements that can be stored.
/////\ingroup vector
////***************************************************************************
//template <typename T, const size_t MAX_SIZE_>
//class vector<T*, MAX_SIZE_> : public ivector<T*>
//{
//public:
static const size_t MAX_SIZE = MAX_SIZE_;
// static const size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.
//*************************************************************************
vector()
: ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
{
ivector<T*>::initialise();
}
// //*************************************************************************
// /// Constructor.
// //*************************************************************************
// vector()
// : ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
// {
// ivector<T*>::initialise();
// }
//*************************************************************************
/// Constructor, with size.
///\param initial_size The initial size of the vector.
//*************************************************************************
explicit vector(size_t initial_size)
: ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
{
ivector<T*>::initialise();
ivector<T*>::resize(initial_size);
}
// //*************************************************************************
// /// Constructor, with size.
// ///\param initial_size The initial size of the vector.
// //*************************************************************************
// explicit vector(size_t initial_size)
// : ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
// {
// ivector<T*>::initialise();
// ivector<T*>::resize(initial_size);
// }
//*************************************************************************
/// Constructor, from initial size and value.
///\param initial_size The initial size of the vector.
///\param value The value to fill the vector with.
//*************************************************************************
vector(size_t initial_size, typename ivector<T*>::parameter_t value)
: ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
{
ivector<T*>::initialise();
ivector<T*>::resize(initial_size, value);
}
// //*************************************************************************
// /// Constructor, from initial size and value.
// ///\param initial_size The initial size of the vector.
// ///\param value The value to fill the vector with.
// //*************************************************************************
// vector(size_t initial_size, typename ivector<T*>::parameter_t value)
// : ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
// {
// ivector<T*>::initialise();
// ivector<T*>::resize(initial_size, value);
// }
//*************************************************************************
/// Constructor, from an iterator range.
///\tparam TIterator The iterator type.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
vector(TIterator first, TIterator last)
: ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
{
ivector<T*>::assign(first, last);
}
// //*************************************************************************
// /// Constructor, from an iterator range.
// ///\tparam TIterator The iterator type.
// ///\param first The iterator to the first element.
// ///\param last The iterator to the last element + 1.
// //*************************************************************************
// template <typename TIterator>
// vector(TIterator first, TIterator last)
// : ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
// {
// ivector<T*>::assign(first, last);
// }
//*************************************************************************
/// Copy constructor.
//*************************************************************************
vector(const vector& other)
: ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
{
ivector<T*>::assign(other.begin(), other.end());
}
// //*************************************************************************
// /// Copy constructor.
// //*************************************************************************
// vector(const vector& other)
// : ivector<T*>(reinterpret_cast<void**>(&buffer), MAX_SIZE)
// {
// ivector<T*>::assign(other.begin(), other.end());
// }
//*************************************************************************
/// Assignment operator.
//*************************************************************************
vector& operator = (const vector& rhs)
{
if (&rhs != this)
{
ivector<T*>::assign(rhs.cbegin(), rhs.cend());
}
// //*************************************************************************
// /// Assignment operator.
// //*************************************************************************
// vector& operator = (const vector& rhs)
// {
// if (&rhs != this)
// {
// ivector<T*>::assign(rhs.cbegin(), rhs.cend());
// }
return *this;
}
// return *this;
// }
private:
//private:
typename etl::aligned_storage<sizeof(void*) * MAX_SIZE, etl::alignment_of<void*>::value>::type buffer;
};
// typename etl::aligned_storage<sizeof(void*) * MAX_SIZE, etl::alignment_of<void*>::value>::type buffer;
//};
}
#endif

View File

@ -392,7 +392,6 @@
<ClCompile Include="..\test_unordered_set.cpp" />
<ClCompile Include="..\test_variant.cpp" />
<ClCompile Include="..\test_vector.cpp" />
<ClCompile Include="..\test_vector_pointer.cpp" />
<ClCompile Include="..\test_visitor.cpp" />
<ClCompile Include="..\test_xor_checksum.cpp" />
</ItemGroup>

View File

@ -788,9 +788,6 @@
<ClCompile Include="..\test_string_wchar_t.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_vector_pointer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Doxyfile">