---
title: "Discussion on \"What is an inline function?\" | Hashnode"
description: "Discussion on \"What is an inline function?\". In C++, the inline keyword serves two main purposes:\n\nOne Definition Rule (ODR) Exception  \nCompiler Optimization Hint\n\nLet’s unpack what that means, see some examples, and discuss best practices.\n\n1. Why inline Exists\n1.1 One Definition Rule Excepti..."
url: "https://hashnode.com/posts/what-is-an-inline-function/688bb13f59bb1bfb7c989699"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is an inline function?](https://piggyfarm.hashnode.dev/what-is-an-inline-function?utm_source=hashnode&utm_medium=feed)

In C++, the inline keyword serves two main purposes: One Definition Rule (ODR) Exception Compiler Optimization Hint Let’s unpack what that means, see some examples, and discuss best practices. 1. Why inline Exists 1.1 One Definition Rule Excepti...

Jul 31, 2025 · 3 min read · piggyfarm.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)

## Written by

[Kim MinbapE](https://hashnode.com/@minbape)

@minbape · Seoul, South Korea

  
[View profile](https://hashnode.com/@minbape)

University Student, ex) PHP Web Developer

I hate bird

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
