Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 26, 2016, 8:32:16 PM (8 years ago)
Author:
muemart
Message:

Minor C++11 improvements:

  • Drop ImplicitConversion.h in favor of std::is_convertible.
  • Move constructor & assignment for MultiType and SubString. I'm not sure if the MultiType should convert types when moving. Currently it doesn't, because otherwise it would have no benefit over copying.
  • Use standard library functions for sleeping.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/util/Convert.h

    r8858 r11098  
    128128#include <sstream>
    129129#include <typeinfo>
     130#include <type_traits>
    130131#include <loki/TypeManip.h>
    131132
    132133#include "Output.h"
    133 #include "ImplicitConversion.h"
    134134
    135135// disable warnings about possible loss of data
     
    308308    struct ConverterExplicit
    309309    {
    310         enum { probe = ImplicitConversion<FromType, ToType>::exists };
     310        static constexpr bool probe = std::is_convertible<FromType, ToType>::value;
    311311        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
    312312        {
Note: See TracChangeset for help on using the changeset viewer.