Directives in the C++ domain¶
The domain name is cpp. See https://www.sphinx-doc.org/en/master/usage/domains/cpp.html.
The following directives are available. All declarations can start with a
visibility statement, public, private, or protected.
- 
class MyClass : public MyBase, MyOtherBase¶
- The - .. cpp:class::directive, showing a class or struct.
- 
class OuterScope::MyClass2 : public MyBase, MyOtherBase¶
- The - .. cpp:class::directive, showing a class or struct.
- 
template<typename T, std::size_t N>
 class std::array¶
- The - .. cpp:class::directive, showing a class or struct.
- 
template<>
 class std::array2<bool, 256>¶
- The - .. cpp:class::directive, showing a class or struct.
- 
template<typename T>
 class std::array3<T, 42>¶
- The - .. cpp:class::directive, showing a class or struct.
- 
bool myMethod(int arg1, std::string arg2)¶
- The - .. cpp:function::directive, showing a function or member function with parameters and types.
- 
bool myMethod2(int, double)¶
- The - .. cpp:function::directive, showing a function or member function with unnamed parameters.
- 
const T &MyClass::operator[](std::size_t i) const¶
- The - .. cpp:function::directive, showing an overload for the indexing operator.
- 
operator bool() const¶
- The - .. cpp:function::directive, showing a casting operator.
- 
constexpr void my_constexpr_function(std::string &bar[2]) noexcept¶
- The - .. cpp:function::directive, showing a- constexprfunction.
- 
MyClass::MyClass4(const MyClass&) = default¶
- The - .. cpp:function::directive, showing a copy constructor with default implementation.
- 
template<typename U>
 void my_function_template(U &&u)¶
- The - .. cpp:function::directive, showing a function template.
- 
template<>
 void my_function_template_specialisation(int i)¶
- The - .. cpp:function::directive, showing a function template specialisation.
- 
std::string MyClass::myMember¶
- The - .. cpp:member::directive, showing a variable or member variable.
- 
int my_member_variable = 42¶
- The - .. cpp:member::directive, showing a member variable.
- 
template<class T>
 constexpr T my_constexpr = T(3.1415926535897932385)¶
- The - .. cpp:member::directive, showing a variable template.
- 
typedef std::vector<int> MyListType¶
- The - .. cpp:type::directive, showing a- typedef-like declaration of a type.
- 
type MyContainerType::const_iterator¶
- The - .. cpp:type::directive, showing a declaration of a type alias with unspecified type.
- 
using MyTypeAlias = std::unordered_map<int, std::string>¶
- The - .. cpp:type::directive, showing a declaration of a type alias.
- 
template<typename T>
 using MyTemplatedTypeAlias = std::vector<T>¶
- The - .. cpp:type::directive, showing a templated type alias.
- 
enum MyEnum¶
- The - .. cpp:enum::directive, showing an unscoped enum.
- 
enum MySpecificEnum : long¶
- The - .. cpp:enum::directive, showing an unscoped enum with specified underlying type.
- 
enum class MyScopedEnum¶
- The - .. cpp:enum-class::directive, showing a scoped enum.
- 
protected enum struct MyScopedVisibilityEnum : std::underlying_type<MySpecificEnum>::type¶
- The - .. cpp:enum-struct::directive, showing a scoped enum with non-default visibility, and with a specified underlying type.
- 
enumerator MyEnum::myOtherEnumerator = 42¶
- The - .. cpp:enumerator::directive, showing a enumerator with a value.
- 
union my_union¶
- The - .. cpp:union::directive, showing a union.
- 
template<typename It>
 concept std::Iterator¶
- The - .. cpp:concept::directive, showing a proxy to an element of a notional sequence.
- 
bool myMethod(int arg1, std::string arg2)
- The - .. cpp:alias::directive, showing an alias declaration.