From 1c077a1fd3f47b2184ad59405ca603dfac06b72d Mon Sep 17 00:00:00 2001 From: Nameless Date: Wed, 16 Mar 2016 17:37:42 +0900 Subject: [PATCH] =?UTF-8?q?literals=E5=90=8D=E5=89=8D=E7=A9=BA=E9=96=93?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dxlibex/basic_types/bel.hpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/dxlibex/basic_types/bel.hpp b/dxlibex/basic_types/bel.hpp index 9c47be7..430678f 100644 --- a/dxlibex/basic_types/bel.hpp +++ b/dxlibex/basic_types/bel.hpp @@ -114,15 +114,23 @@ namespace dxle { using namespace sound_units; } #ifdef DXLE_SUPPORT_CXX11_USER_DEFINED_LITERALS -namespace dxle { namespace sound_units { namespace sound_units_literals { - inline DXLE_CONSTEXPR myrio_bel operator "" _myrioB(unsigned long long myrioB) { - return myrio_bel(static_cast(myrioB)); +namespace dxle { + namespace literals { + namespace sound_units_literals { + inline DXLE_CONSTEXPR myrio_bel operator "" _myrioB(unsigned long long myrioB) { + return myrio_bel(static_cast(myrioB)); + } + inline DXLE_CONSTEXPR deci_bel operator "" _dB(unsigned long long myrioB) { + return deci_bel(static_cast(myrioB)); + } + } + using namespace sound_units_literals; } - inline DXLE_CONSTEXPR deci_bel operator "" _dB(unsigned long long myrioB) { - return deci_bel(static_cast(myrioB)); + using namespace literals; + + namespace sound_units { + using namespace literals::sound_units_literals; } } -using namespace sound_units_literals; -}} #endif #endif //DXLE_INC_BASIC_TYPES_BEL_HPP_