Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: base/safe_numerics_unittest.nc

Issue 11886037: Add numeric_cast for checked integral narrowing casts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/safe_numerics.h"
6
7 namespace base {
8 namespace internal {
9
10 void NoFloatingPoint {
11 IsValidNumericCast<float>(0.0);
12 IsValidNumericCast<double>(0.0f);
13 IsValidNumericCast<int>(DBL_MAX);
14 }
15
16 } // namespace internal
17 } // namespace base
OLDNEW
« base/safe_numerics_unittest.cc ('K') | « base/safe_numerics_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698