How to return an array reference from a const function?
class State{ Chips (&arr() const)[6][7] { return arr_; } Chips val() const { return val_; } }
Incorrect initialization of a link of type 'Chips (&) [6] [7]' from an expression of type 'const Chips [6] [7]'
Thank.
, arr_ (, , ), . arr arr_ const Chips[6][7]. Chops (&)[6][7], const-correctness. , , const
arr_
arr
const Chips[6][7]
Chops (&)[6][7]
const
... const Chips (&arr() const)[6][7] { return arr_; } ...
typedef
... typedef Chips Chips67[6][7]; const Chips67 &arr() const { return arr_; } ...
. ,
Chips* arr() const;
, .
Source: https://habr.com/ru/post/1765030/More articles:Extra GET requests before POST request that my code does not do - javascriptHow to set ACL folders with Web deployment in VS2010? - asp.netThe relationship between a Java thread and OS threads - javaWhere is the .htacess apache file located on Linux Red Hat? - apacheNSArrayController Class vs Entity mode in Core Data Mac OS X based on documents - cocoaStorage of a private "octet string" in Active Directory; what is safe by default? - securityСвойство EnableViewState в текстовом поле - asp.netCRM 4.0 workflow error message for user - workflow-foundationGNAT - GVD: not in executable format: file format not recognized - adaHow to generate xml file using web services in Java? - javaAll Articles