[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 61c1056 2/6: Demonstrate effect of redundantl
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 61c1056 2/6: Demonstrate effect of redundantly specifying deduced template parameter |
Date: |
Wed, 7 Nov 2018 02:40:34 -0500 (EST) |
branch: master
commit 61c10565e8454b747b7972a5f9d1169519033291
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Demonstrate effect of redundantly specifying deduced template parameter
---
input_test.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/input_test.cpp b/input_test.cpp
index 413c94f..16e817f 100644
--- a/input_test.cpp
+++ b/input_test.cpp
@@ -159,6 +159,12 @@ void input_test::test_product_database()
auto const b {db.query<oenum_alb_or_anb>(DB_MaturityAge)};
BOOST_TEST_EQUAL(100, b);
+ // Redundant template argument is okay.
+ db.query_into<oenum_alb_or_anb>(DB_MaturityAge, a);
+ // Fails to compile with wrong template argument:
+// db.query_into<float>(DB_MaturityAge, a);
+// db.query_into<bool >(DB_MaturityAge, a);
+
// This value is not integral, so bourn_cast rejects it.
BOOST_TEST_THROW
(db.query_into(DB_NaarDiscount, a)
- [lmi-commits] [lmi] master updated (8580716 -> 259f97c), Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 61c1056 2/6: Demonstrate effect of redundantly specifying deduced template parameter,
Greg Chicares <=
- [lmi-commits] [lmi] master 5b4e08d 4/6: Remove redundant template arguments, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 937ceba 3/6: Strengthen type checking, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 4b2a5d7 5/6: Use query_into() wherever it fits, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 8667743 1/6: Replace ...cast<T>(...Query(...)) with ...Query<T>(...), Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 259f97c 6/6: Use query<bool> with DB_Allow* and DB_TermIsNotRider, Greg Chicares, 2018/11/07