fn: add_member_fns
[contents]

Contents

Syntax

The syntax for add_member_fns calls is:

f++:  
add_member_fns()
add_member_fns(bool) 

n++:  
@add_member_fns()
@add_member_fns(bool) 

Description

The add_member_fns function is for getting and setting whether to add member functions by default for things like definitions and user-defined function calls. It either:

  • takes zero parameters and returns whether member functions are added by default; or
  • takes a single boolean parameter specifying whether to add member functions by default (default value is 1).

f++ example

Example of add_member_fns being used with f++:

add_member_fns(0)
console(add_member_fns())

std::vector<string>{...} v("cat", "dog")
console(std::vector.at(v, 1))

n++ example

Example of add_member_fns being used with n++:

@add_member_fns(0)
@console(add_member_fns())

@std::vector<string>{...}(v("cat", "dog"))
@console(std::vector.at(v, 1))