aboutsummaryrefslogtreecommitdiff
path: root/odb/header.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-08 13:59:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-08 13:59:35 +0200
commit2240c904c16aa0c5cdb261c17070d971f06a8c01 (patch)
tree34de7bf627c861ad92ec9e408b7202f5175fd73f /odb/header.cxx
parent7fb62d77f7178c4f63cc7af48e603d96697500d7 (diff)
Omit TR1 support from C++11 and up
Diffstat (limited to 'odb/header.cxx')
-rw-r--r--odb/header.cxx33
1 files changed, 18 insertions, 15 deletions
diff --git a/odb/header.cxx b/odb/header.cxx
index 6654a42..48c55de 100644
--- a/odb/header.cxx
+++ b/odb/header.cxx
@@ -778,22 +778,25 @@ namespace header
<< "#include <odb/wrapper-traits.hxx>" << endl
<< "#include <odb/pointer-traits.hxx>" << endl;
- // In case of a boost TR1 implementation, we cannot distinguish
- // between the boost::shared_ptr and std::tr1::shared_ptr usage since
- // the latter is just a using-declaration for the former. To resolve
- // this we will include TR1 traits if the Boost TR1 header is included.
- //
- if (ctx.features.tr1_pointer)
- {
- os << "#include <odb/tr1/wrapper-traits.hxx>" << endl
- << "#include <odb/tr1/pointer-traits.hxx>" << endl;
- }
- else if (ctx.features.boost_pointer)
+ if (ctx.options.std () == cxx_version::cxx98)
{
- os << "#ifdef BOOST_TR1_MEMORY_HPP_INCLUDED" << endl
- << "# include <odb/tr1/wrapper-traits.hxx>" << endl
- << "# include <odb/tr1/pointer-traits.hxx>" << endl
- << "#endif" << endl;
+ // In case of a boost TR1 implementation, we cannot distinguish
+ // between the boost::shared_ptr and std::tr1::shared_ptr usage since
+ // the latter is just a using-declaration for the former. To resolve
+ // this we will include TR1 traits if the Boost TR1 header is included.
+ //
+ if (ctx.features.tr1_pointer)
+ {
+ os << "#include <odb/tr1/wrapper-traits.hxx>" << endl
+ << "#include <odb/tr1/pointer-traits.hxx>" << endl;
+ }
+ else if (ctx.features.boost_pointer)
+ {
+ os << "#ifdef BOOST_TR1_MEMORY_HPP_INCLUDED" << endl
+ << "# include <odb/tr1/wrapper-traits.hxx>" << endl
+ << "# include <odb/tr1/pointer-traits.hxx>" << endl
+ << "#endif" << endl;
+ }
}
os << "#include <odb/container-traits.hxx>" << endl;