{
  "id": "enwiki-001309025165",
  "slug": "static-cast",
  "title": "Static cast",
  "qid": "",
  "lead": "In the C++ programming language, static_cast is an operator that performs an explicit type conversion.",
  "body": "In the C++ programming language, static_cast is an operator that performs an explicit type conversion. ==Syntax== static_cast (object); The type parameter must be a data type to which object can be converted via a known method, whether it be a builtin or a cast. The type can be a reference or an enumerator. All types of conversions that are well-defined and allowed by the compiler are performed using static_cast . The static_cast<> operator can be used for operations such as: converting a pointer of a base class to a pointer of a non-virtual derived class (downcasting); converting numeric data types such as enums to ints or floats. Although static_cast conversions are checked at compile time to prevent obvious incompatibilities, no run-time type checking is performed that would prevent a cast between incompatible data types, such as pointers. A static_cast from a pointer to a class B to a pointer to a derived class D is ill-formed if B is an inaccessible or ambiguous base of D . A static_cast from a pointer of a virtual base class (or a base class of a virtual base class) to a pointer of a derived class is ill-formed. ==See also== dynamic_cast reinterpret_cast const_cast ==References==",
  "categories": [
    "23184608",
    "23603337",
    "26220375",
    "26863021",
    "29176688",
    "31336201",
    "36327952"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1309025165",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1756747133.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001309025165",
    "type": "webpage",
    "title": "Static cast",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/static-cast",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          20
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          20
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001309025165",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1309025165",
    "note": "Immutable snapshot enwiki-001309025165"
  }
}