# Int64\_t vs juce::int64

**URL:** https://forum.juce.com/t/int64-t-vs-juce-int64/45358
**Category:** General JUCE discussion
**Created:** [April 5, 2021, 8:47am UTC](https://forum.juce.com/t/int64-t-vs-juce-int64/45358 "2021-04-05T08:47:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)
#### Post date: [April 5, 2021, 8:47am UTC](https://forum.juce.com/t/int64-t-vs-juce-int64/45358/1 "2021-04-05T08:47:07Z")

</div>

JUCE has provided many cross-platform C++ utilities, among them `juce::int64`, but nowadays it seems that C++ has had a standard `int64_t` for a while now.

Mostly the two are interchangeable, but it seems that in Linux Makefile based builds, `juce::int64` is `typedef` to `long long`, while `int64_t` is `typedef` to `long`. Both are 64-bit but when one `override`s JUCE methods one has to use the `juce::int64` specifically.

The problem is that if one usually develops in Xcode and Visual Studio and has a preference towards standard types like `int64_t`, then their code won’t compile on Linux, and it’s just another extra hurdle to deal with among all the other computing paper cuts 😕

Suggestions:

- Make `juce::int64` a typedef to `int64_t`
- Recommend using `int64_t`
- Deprecate `juce::int64`

Cheers, Yair

---

<div class="post-metadata">

### Author: ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)
#### Post date: [April 15, 2021, 4:19pm UTC](https://forum.juce.com/t/int64-t-vs-juce-int64/45358/2 "2021-04-15T16:19:21Z")

</div>

If we are going this route then I think it makes sense to replace all of JUCE’s int types. This would be a very large commit and a significant breaking change.

We’ll need to evaluate how painful this will be for large JUCE-based projects. In any case, this is not something we will do before we have merged the accessibility work in JUCE 6.1.

---

<div class="post-metadata">

### Author: ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)
#### Post date: [April 18, 2021, 7:27am UTC](https://forum.juce.com/t/int64-t-vs-juce-int64/45358/3 "2021-04-18T07:27:48Z")

</div>

> a significant breaking change

At least regarding making `juce::int64` a typedef to `int64_t`, I wouldn’t expect that to break anything

---

<div class="post-metadata">

### Author: ![t0m](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/t0m/32/16413_2.png) [@t0m](https://forum.juce.com/u/t0m)
#### Post date: [April 18, 2021, 7:45am UTC](https://forum.juce.com/t/int64-t-vs-juce-int64/45358/4 "2021-04-18T07:45:42Z")

</div>

That has the potential to break user code; on Linux when `juce::int64 == int64_t == long` it can make previously unambiguous function overloads collide.

---

<div class="post-metadata">

### Author: ![yairadix](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yairadix/32/1114_2.png) [@yairadix](https://forum.juce.com/u/yairadix)
#### Post date: [April 18, 2021, 9:29am UTC](https://forum.juce.com/t/int64-t-vs-juce-int64/45358/5 "2021-04-18T09:29:14Z")

</div>

Blimey, I guess it could
