Namespaces
Variants

cpp/utility/bitset/operator at: Difference between revisions

From cppreference.com
P12bot (talk | contribs)
m Text replace - "<!-- ======== --> " to ""
P12bot (talk | contribs)
m Text replace - "{{params}}" to "===Parameters==="
Line 12: Line 12:
Accesses the bit at position {{tt|pos}}. The first version returns the value of the bit, the second version returns an object of type {{ltt|todo|reference}} that allows modification of the value.
Accesses the bit at position {{tt|pos}}. The first version returns the value of the bit, the second version returns an object of type {{ltt|todo|reference}} that allows modification of the value.


{{params}}
{{param list begin}}
{{param list begin}}
{{param list item | pos | position of the bit to return}}
{{param list item | pos | position of the bit to return}}

Revision as of 01:41, 3 August 2011

Template:cpp/utility/bitset/sidebar Template:ddcl list begin

bool operator[]( size_t pos ) const;

(1)

reference operator[]( size_t pos );

(2) Template:ddcl list end Accesses the bit at position pos. The first version returns the value of the bit, the second version returns an object of type reference that allows modification of the value.

Parameters

pos - position of the bit to return

Template:returns 1) the value of the requested bit

2) an object of type reference with the value of the bit.

Template:see also

accesses specific bit
(public member function) [edit]