@@ -1295,11 +1295,17 @@ class Array
1295
1295
m_ptr[m_md->size ].~T ();
1296
1296
}
1297
1297
// ! Elément d'indice \a i. Vérifie toujours les débordements
1298
- ConstReferenceType at (Int64 i) const
1298
+ T& at (Int64 i)
1299
1299
{
1300
1300
arccoreCheckAt (i,m_md->size );
1301
1301
return m_ptr[i];
1302
1302
}
1303
+ // ! Elément d'indice \a i. Vérifie toujours les débordements
1304
+ ConstReferenceType at (Int64 i) const
1305
+ {
1306
+ arccoreCheckAt (i, m_md->size );
1307
+ return m_ptr[i];
1308
+ }
1303
1309
// ! Positionne l'élément d'indice \a i. Vérifie toujours les débordements
1304
1310
void setAt (Int64 i,ConstReferenceType value)
1305
1311
{
@@ -1593,18 +1599,24 @@ class SharedArray
1593
1599
inline SharedArray (const UniqueArray<T>& rhs);
1594
1600
1595
1601
/* !
1596
- * \brief Créé un tableau de \a asize éléments avec un
1597
- * allocateur spécifique \a allocator.
1598
- *
1599
- * Si ArrayTraits<T>::IsPODType vaut TrueType, les éléments ne sont pas
1600
- * initialisés. Sinon, c'est le constructeur par défaut de T qui est utilisé.
1602
+ * \brief Créé un tableau vide avec un allocateur spécifique \a allocator.
1601
1603
*
1602
1604
* \warning Using specific allocator for SharedArray is experimental
1603
1605
*/
1604
1606
explicit SharedArray (IMemoryAllocator* allocator)
1607
+ : SharedArray(MemoryAllocationOptions(allocator))
1608
+ {
1609
+ }
1610
+
1611
+ /* !
1612
+ * \brief Créé un tableau vide avec un allocateur spécifique \a allocation_options.
1613
+ *
1614
+ * \warning Using specific allocator for SharedArray is experimental
1615
+ */
1616
+ explicit SharedArray (const MemoryAllocationOptions& allocation_options)
1605
1617
: Array<T>()
1606
1618
{
1607
- this ->_initFromAllocator (allocator ,0 );
1619
+ this ->_initFromAllocator (allocation_options ,0 );
1608
1620
this ->_checkValidSharedArray ();
1609
1621
}
1610
1622
@@ -1614,22 +1626,28 @@ class SharedArray
1614
1626
*
1615
1627
* Si ArrayTraits<T>::IsPODType vaut TrueType, les éléments ne sont pas
1616
1628
* initialisés. Sinon, c'est le constructeur par défaut de T qui est utilisé.
1617
- *
1618
- * \warning Using specific allocator for SharedArray is experimental
1619
1629
*/
1620
1630
SharedArray (IMemoryAllocator* allocator,Int64 asize)
1621
- : Array<T>( )
1631
+ : SharedArray(MemoryAllocationOptions(allocator), asize )
1622
1632
{
1623
- this ->_initFromAllocator (allocator,asize);
1624
- this ->_resize (asize);
1625
- this ->_checkValidSharedArray ();
1626
1633
}
1627
1634
1628
1635
/* !
1629
- * \brief Créé un tableau avec l'allocateur \a allocator en recopiant les valeurs \a rhs.
1636
+ * \brief Créé un tableau de \a asize éléments avec un
1637
+ * allocateur spécifique \a allocator.
1630
1638
*
1631
- * \warning Using specific allocator for SharedArray is experimental
1639
+ * Si ArrayTraits<T>::IsPODType vaut TrueType, les éléments ne sont pas
1640
+ * initialisés. Sinon, c'est le constructeur par défaut de T qui est utilisé.
1632
1641
*/
1642
+ SharedArray (const MemoryAllocationOptions& allocation_options, Int64 asize)
1643
+ : Array<T>()
1644
+ {
1645
+ this ->_initFromAllocator (allocation_options, asize);
1646
+ this ->_resize (asize);
1647
+ this ->_checkValidSharedArray ();
1648
+ }
1649
+
1650
+ // !Créé un tableau avec l'allocateur \a allocator en recopiant les valeurs \a rhs.
1633
1651
SharedArray (IMemoryAllocator* allocator,Span<const T> rhs)
1634
1652
{
1635
1653
this ->_initFromAllocator (allocator,0 );
0 commit comments