[libc-commits] [libc] [libc][stdfix] Implement fxdivi functions (rdivi) (PR #154914)

via libc-commits libc-commits at lists.llvm.org
Fri Aug 29 13:30:00 PDT 2025


================
@@ -0,0 +1,61 @@
+//===-- Utility class to test fxdivi functions ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/CPP/type_traits.h"
+#include "src/__support/fixed_point/fx_bits.h"
+#include "src/__support/fixed_point/fx_rep.h"
+#include "test/UnitTest/Test.h"
+
+template <typename XType> XType get_epsilon() {
+  // TODO: raise error
+  return 0;
+}
----------------
PiJoules wrote:

I think you can just declare the template then a compile error is given if none of the uses match the template specializations below.

https://github.com/llvm/llvm-project/pull/154914


More information about the libc-commits mailing list